forked from SharpGenTools/SharpGenTools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSdkPackage.targets
38 lines (35 loc) · 1.69 KB
/
SdkPackage.targets
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
<Project>
<ItemGroup>
<PackageReference Update="@(PackageReference)" PrivateAssets="all" />
<ProjectReference Update="@(ProjectReference)" PrivateAssets="all" />
</ItemGroup>
<!--
The include needs to happen after output has been copied to build output folder
but before NuGet generates a nuspec.
-->
<Target Name="PackSdkPackageFiles" BeforeTargets="GenerateNuspec">
<ItemGroup>
<ReferencedAssemblies Include="bin\$(Configuration)\**\*.dll" />
<ReferencedAssemblies Include="bin\$(Configuration)\**\*.pdb" Condition="'$(Configuration)' == 'Debug'" />
<ReferencedAssemblies Remove="@(ReferencedAssemblies->WithMetadataValue('FileName', '$(AssemblyName)'))" />
<_PackageFiles Include="@(ReferencedAssemblies)">
<PackagePath>tools\%(RecursiveDir)%(FileName)%(Extension)</PackagePath>
<Visible>false</Visible>
<BuildAction>None</BuildAction>
</_PackageFiles>
</ItemGroup>
<Touch Files="$(BaseIntermediateOutputPath)$(Configuration)/_._" AlwaysCreate="true" />
<ItemGroup>
<_PackageFiles Include="$(BaseIntermediateOutputPath)$(Configuration)/_._">
<PackagePath>lib/netstandard2.0</PackagePath>
<Visible>false</Visible>
<BuildAction>None</BuildAction>
</_PackageFiles>
<_PackageFiles Include="$(BaseIntermediateOutputPath)$(Configuration)/_._">
<PackagePath>lib/net6.0</PackagePath>
<Visible>false</Visible>
<BuildAction>None</BuildAction>
</_PackageFiles>
</ItemGroup>
</Target>
</Project>