Skip to content

Commit cee2a98

Browse files
committed
Fixed package except for target frameworks groups in nuspec
1 parent 18610b0 commit cee2a98

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

src/Nerdbank.GitVersioning.Tasks/Nerdbank.GitVersioning.Tasks.csproj

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<!-- We're going to include it by virtue of sending the whole bin dir to the build folder. -->
2121
<IncludeBuildOutput>false</IncludeBuildOutput>
22-
22+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
2323
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
2424
</PropertyGroup>
2525

@@ -29,39 +29,26 @@
2929
</PropertyGroup>
3030
</Target>
3131

32-
<Target Name="CollectRuntimeOutputs" BeforeTargets="_GetPackageFiles">
33-
<ItemGroup>
34-
<Content Include="$(OutputPath)net45\*.dll;$(OutputPath)net45\*.dll.config"
35-
Exclude="$(OutputPath)net45\Microsoft.Build.*.dll">
36-
<Pack>true</Pack>
37-
<PackagePath>build\MSBuildFull\</PackagePath>
38-
</Content>
39-
<Content Include="$(OutputPath)netcoreapp1.0\LibGit2Sharp.dll*"
40-
Include="$(OutputPath)netcoreapp1.0\MSBuildExtensionTask.dll"
41-
Include="$(OutputPath)netcoreapp1.0\Nerdbank.GitVersioning.*dll"
42-
Include="$(OutputPath)netcoreapp1.0\Newtonsoft.Json.dll"
43-
Include="$(OutputPath)netcoreapp1.0\Validation.dll"
44-
>
45-
<Pack>true</Pack>
46-
<PackagePath>build\MSBuildCore\</PackagePath>
47-
</Content>
48-
</ItemGroup>
49-
<MSBuild Projects="$(MSBuildProjectFullPath)"
50-
Targets="GetLibGitNativeBinaries"
51-
BuildInParallel="$(BuildInParallel)"
52-
Properties="TargetFramework=%(_TargetFrameworks.Identity);BuildProjectReferences=false;">
53-
<Output TaskParameter="TargetOutputs" ItemName="None" />
54-
</MSBuild>
55-
</Target>
56-
57-
<Target Name="GetLibGitNativeBinaries" Outputs="@(LibGitNativeBinaries)">
58-
<!-- Package up the libgit2 native binaries -->
32+
<Target Name="PackBuildOutputs" DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup">
33+
<PropertyGroup>
34+
<BuildSubDir Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">MSBuildCore\</BuildSubDir>
35+
<BuildSubDir Condition=" '$(TargetFramework)' == 'net45' ">MSBuildFull\</BuildSubDir>
36+
</PropertyGroup>
37+
<Error Text="Unrecognized TargetFramework" Condition=" '$(BuildSubDir)' == '' " />
5938
<ItemGroup>
60-
<!-- Adapt the copy behavior -->
61-
<LibGitNativeBinaries Include="@(None)" Condition=" '%(None.CopyToOutputDirectory)' == 'PreserveNewest' ">
62-
<Pack>true</Pack>
63-
<PackagePath>build\%(None.Link)</PackagePath>
64-
</LibGitNativeBinaries>
39+
<TfmSpecificPackageFile Include="
40+
$(OutputPath)LibGit2Sharp.dll*;
41+
$(OutputPath)MSBuildExtensionTask.dll;
42+
$(OutputPath)Nerdbank.GitVersioning.*dll;
43+
$(OutputPath)Newtonsoft.Json.dll;
44+
$(OutputPath)Validation.dll;
45+
">
46+
<PackagePath>build\$(BuildSubDir)</PackagePath>
47+
</TfmSpecificPackageFile>
48+
<!-- Package up the libgit2 native binaries -->
49+
<TfmSpecificPackageFile Include="@(None)" Condition=" '%(None.CopyToOutputDirectory)' == 'PreserveNewest' ">
50+
<PackagePath>build\$(BuildSubDir)%(None.Link)</PackagePath>
51+
</TfmSpecificPackageFile>
6552
</ItemGroup>
6653
</Target>
6754

0 commit comments

Comments
 (0)