/
Nerdbank.GitVersioning.Tasks.csproj
93 lines (84 loc) · 3.91 KB
/
Nerdbank.GitVersioning.Tasks.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NuSpecFile>Nerdbank.GitVersioning.nuspec</NuSpecFile>
<NoPackageAnalysis>true</NoPackageAnalysis>
<!-- Note that https://github.com/NuGet/Home/issues/4694 prevents this from actually working. -->
<developmentDependency>true</developmentDependency>
<!-- We're going to include it by virtue of sending the whole bin dir to the build folder. -->
<IncludeBuildOutput>false</IncludeBuildOutput>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<LibGit2SharpNativeBinaries>$(NuGetPackageRoot)libgit2sharp.nativebinaries\$(LibGit2SharpNativeVersion)\</LibGit2SharpNativeBinaries>
<NuspecProperties>$(NuspecProperties);Version=$(Version);commit=$(GitCommitId);BaseOutputPath=$(OutputPath);LibGit2SharpNativeBinaries=$(LibGit2SharpNativeBinaries)</NuspecProperties>
</PropertyGroup>
</Target>
<Target Name="PackBuildOutputs" DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup">
<PropertyGroup>
<BuildSubDir Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">MSBuildCore\</BuildSubDir>
<BuildSubDir Condition=" '$(TargetFramework)' == 'net461' ">MSBuildFull\</BuildSubDir>
</PropertyGroup>
<Error Text="Unrecognized TargetFramework" Condition=" '$(BuildSubDir)' == '' " />
<ItemGroup>
<TfmSpecificPackageFile Include="
$(OutputPath)LibGit2Sharp.dll*;
$(OutputPath)MSBuildExtensionTask.dll;
$(OutputPath)Nerdbank.GitVersioning.*dll;
$(OutputPath)Newtonsoft.Json.dll;
$(OutputPath)Validation.dll;
">
<PackagePath>build\$(BuildSubDir)</PackagePath>
</TfmSpecificPackageFile>
<!-- Package up the libgit2 native binaries -->
<TfmSpecificPackageFile Include="@(ContentWithTargetPath)" Condition=" '%(ContentWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest' ">
<PackagePath>build\$(BuildSubDir)%(ContentWithTargetPath.TargetPath)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
<ItemGroup>
<None Include="build\**">
<Pack>true</Pack>
<PackagePath>build\</PackagePath>
</None>
<None Include="buildCrossTargeting\**">
<Pack>true</Pack>
<PackagePath>buildCrossTargeting\</PackagePath>
</None>
<None Include="tools\**">
<Pack>true</Pack>
<PackagePath>tools\</PackagePath>
</None>
<None Include="readme.txt">
<Pack>true</Pack>
<PackagePath>readme.txt</PackagePath>
</None>
</ItemGroup>
<ItemDefinitionGroup>
<PackageReference>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<ProjectReference>
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning.LKG" Version="1.6.20-beta-gfea83a8c9e" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NerdBank.GitVersioning\NerdBank.GitVersioning.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.9.20" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.9.20" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Shared\**\*.cs" LinkBase="Shared" />
</ItemGroup>
</Project>