This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathNuGet.Build.Packaging.Tasks.targets
More file actions
119 lines (105 loc) · 4.92 KB
/
NuGet.Build.Packaging.Tasks.targets
File metadata and controls
119 lines (105 loc) · 4.92 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ThisAssemblyProjectProperty Include="PackageId" />
</ItemGroup>
<PropertyGroup>
<PackageId>NuGet.Build.Packaging</PackageId>
<Authors>Microsoft</Authors>
<Owners>Microsoft</Owners>
<Copyright>© .NET Foundation. All rights reserved.</Copyright>
<Title>NuGetizer-3000</Title>
<Description>NuGet Packaging Targets</Description>
<NeutralLanguage>en</NeutralLanguage>
<IsDevelopmentDependency>true</IsDevelopmentDependency>
<PackageLicenseUrl>https://raw.githubusercontent.com/NuGet/NuGet.Build.Packaging/dev/LICENSE.txt</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/NuGet/NuGet.Build.Packaging</PackageProjectUrl>
<InferLegacyPackageReferences>false</InferLegacyPackageReferences>
<IncludeContentInPackage>false</IncludeContentInPackage>
<IncludeOutputsInPackage>false</IncludeOutputsInPackage>
<IncludeSymbolsInPackage>false</IncludeSymbolsInPackage>
<IncludeFrameworkReferencesInPackage>false</IncludeFrameworkReferencesInPackage>
</PropertyGroup>
<Import Project="$(OutputPath)NuGet.Build.Packaging.targets"
Condition="'$(PackOnBuild)' == 'true' and Exists('$(OutputPath)NuGet.Build.Packaging.targets')" />
<Target Name="AddBuiltOutput" BeforeTargets="GetPackageContents" DependsOnTargets="AllProjectOutputGroups" Returns="@(PackageFile)">
<!-- Update packaging version targets -->
<PropertyGroup>
<XmlNs><Namespace Prefix='msb' Uri='http://schemas.microsoft.com/developer/msbuild/2003'/></XmlNs>
</PropertyGroup>
<XmlPoke Namespaces="$(XmlNs)"
XmlInputPath="$(OutputPath)NuGet.Build.Packaging.Version.props"
Query="/msb:Project/msb:PropertyGroup/msb:PackagingTargetsVersion"
Value="$(PackageVersion)"/>
<ItemGroup>
<PackageFile Include="$(OutputPath)ApiIntersect.exe">
<PackagePath>build\ApiIntersect.exe</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)ApiIntersect.exe.config">
<PackagePath>build\ApiIntersect.exe.config</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)ICSharpCode.Decompiler.dll">
<PackagePath>build\ICSharpCode.Decompiler.dll</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)ICSharpCode.NRefactory.CSharp.dll">
<PackagePath>build\ICSharpCode.NRefactory.CSharp.dll</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)ICSharpCode.NRefactory.dll">
<PackagePath>build\ICSharpCode.NRefactory.dll</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)Mono.Cecil.dll">
<PackagePath>build\Mono.Cecil.dll</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)Mono.Options.dll">
<PackagePath>build\Mono.Options.dll</PackagePath>
</PackageFile>
<PackageFile Include="$(OutputPath)NuGet.Build.Packaging.Version.props">
<PackagePath>build\NuGet.Build.Packaging.Version.props</PackagePath>
</PackageFile>
<PackageFile Include="@(ContentWithTargetPath)">
<PackagePath>build\%(ContentWithTargetPath.TargetPath)</PackagePath>
</PackageFile>
<PackageFile Include="@(BuiltProjectOutputGroupOutput -> '%(FinalOutputPath)')">
<PackagePath>build\%(Filename)%(Extension)</PackagePath>
</PackageFile>
<PackageFile Include="@(DebugSymbolsProjectOutputGroupOutput -> '%(FinalOutputPath)')">
<PackagePath>build\%(Filename)%(Extension)</PackagePath>
</PackageFile>
</ItemGroup>
</Target>
<PropertyGroup>
<CoreCompileDependsOn>
PackageItemKind;
$(CoreCompileDependsOn);
</CoreCompileDependsOn>
<PackageItemKindFile>$(IntermediateOutputPath)PackageItemKind.g$(DefaultLanguageSourceExtension)</PackageItemKindFile>
</PropertyGroup>
<Target Name="PackageItemKind" BeforeTargets="BuildOnlySettings" DependsOnTargets="GeneratePackageItemKind">
<ItemGroup>
<Compile Include="$(PackageItemKindFile)" />
</ItemGroup>
</Target>
<Target Name="GeneratePackageItemKind" Inputs="$(MSBuildThisFileFullPath);NuGet.Build.Packaging.props" Outputs="$(PackageItemKindFile)">
<MakeDir Directories="$(IntermediateOutputPath)" Condition=" !Exists('$(IntermediateOutputPath)') " />
<MSBuild Projects="NuGet.Build.Packaging.props" Targets="_GetPackageItemKinds">
<Output ItemName="_PackageItemKind" TaskParameter="TargetOutputs" />
</MSBuild>
<WriteLinesToFile Lines='
namespace $(RootNamespace)
{
/// <summary>Available Kind metadata for PackageFile and _PackageContent items</summary>
public static partial class PackageItemKind
{
' Overwrite='true' File='$(PackageItemKindFile)' />
<WriteLinesToFile Lines='
/// <summary>Kind: %(_PackageItemKind.Identity)</summary>
public const string %(_PackageItemKind.Identity) = nameof(%(_PackageItemKind.Identity))%3B
' Overwrite='false' File='$(PackageItemKindFile)' />
<WriteLinesToFile Lines='
}
}
' Overwrite='false' File='$(PackageItemKindFile)' />
<ItemGroup>
<FileWrites Include="$(PackageItemKindFile)" />
</ItemGroup>
</Target>
</Project>