-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
NuGetizer.props
186 lines (169 loc) · 8.74 KB
/
NuGetizer.props
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!--
***********************************************************************************************
NuGetizer.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Hidden">
<!-- Whether the current project is a packaging project. Defaults to true if project extension is .nuproj, .msbuildproj or .proj. -->
<IsPackagingProject Condition="'$(IsPackagingProject)' == '' and ('$(MSBuildProjectExtension)' == '.nuproj' or '$(MSBuildProjectExtension)' == '.msbuildproj' or '$(MSBuildProjectExtension)' == '.proj')">true</IsPackagingProject>
<!-- Disable built-in Pack -->
<ImportNuGetBuildTasksPackTargetsFromSdk>false</ImportNuGetBuildTasksPackTargetsFromSdk>
<!-- Ensure the right value is always available -->
<IsCrossTargetingBuild Condition="'$(IsCrossTargetingBuild)' == '' and '$(TargetFrameworks)' != '' and '$(TargetFramework)' == ''">true</IsCrossTargetingBuild>
</PropertyGroup>
<PropertyGroup Label="Hidden" Condition="'$(UsingMicrosoftNETSdk)' == 'true'">
<!-- Point the pack targets to our metadata one, so it's imported last automatically, from the Sdk.targets. -->
<NuGetBuildTasksPackTargets>$(MSBuildThisFileDirectory)NuGetizer.PackageMetadata.targets</NuGetBuildTasksPackTargets>
<ImportNuGetBuildTasksPackTargetsFromSdk>true</ImportNuGetBuildTasksPackTargetsFromSdk>
</PropertyGroup>
<PropertyGroup Label="Hidden" Condition="'$(CI)' == ''">
<CI>false</CI>
<!-- GH, CircleCI, GitLab and BitBucket already use CI -->
<CI Condition="'$(TF_BUILD)' == 'true' or
'$(TEAMCITY_VERSION)' != '' or
'$(APPVEYOR)' != '' or
'$(BuildRunner)' == 'MyGet' or
'$(JENKINS_URL)' != '' or
'$(TRAVIS)' == 'true' or
'$(BUDDY)' == 'true'">true</CI>
</PropertyGroup>
<ItemGroup>
<AvailableItemName Include="PackageFile" />
</ItemGroup>
<ItemDefinitionGroup>
<_MSBuildProjectReferenceExistent>
<!-- Allows referencing this metadata value even if not defined anywhere -->
<PackFolder />
</_MSBuildProjectReferenceExistent>
<PackageReference>
<!-- This enables referencing arbitrary files from any package by adding PackageReference="" to a file -->
<GeneratePathProperty>true</GeneratePathProperty>
</PackageReference>
<PackageFile>
<!-- See @(PackFolderKind) below -->
<PackFolder>None</PackFolder>
<!-- By default, we consider all PackageFile items to be explicitly added by the user
the automatic discovery will annotate those with Implicit instead.
This allows the duplicate item detection to either warn (Implicit) or error (Explicit). -->
<Source>Explicit</Source>
<!-- Used to include files from referenced packages -->
<PackageReference />
<PackageReferencePathProperty />
<PackageReferencePath />
<!-- Populated by content inference to preserve original identity -->
<OriginalItemSpec />
<!-- Don't show package files in project explorer by default -->
<Visible>false</Visible>
<TargetFramework />
<!-- The (pack) target framework of the originating project -->
<OriginalTargetFramework />
<!-- The determined default (pack) target framework of an inferred item -->
<DefaultTargetFramework />
</PackageFile>
<PackageReference>
<!-- See https://github.com/NuGet/Home/wiki/PackageReference-Specification -->
<!-- A version range. See http://docs.nuget.org/ndocs/create-packages/dependency-versions#version-ranges -->
<Version />
<!-- When set to All, denotes a development dependency -->
<PrivateAssets />
</PackageReference>
<PackFolderKind>
<!-- PackageFolder should map to a supported folder as defined in PackagingConstants.Folders -->
<!-- If empty, causes the file to end up in %(RelativeDir) -->
<PackageFolder />
<!-- FrameworkSpecific is whether the PackagePath will include the project's TF or not -->
<FrameworkSpecific>false</FrameworkSpecific>
</PackFolderKind>
</ItemDefinitionGroup>
<!-- Default mapping between %(PackageFile.PackageFolder) metadata and package folders inside .nupkg -->
<ItemGroup>
<!-- Used in authoring projects -->
<PackFolderKind Include="Ignore" />
<PackFolderKind Include="Content;ContentFiles">
<!--
Plain "content" is deprecated as of NuGet v3+
See https://docs.nuget.org/ndocs/schema/nuspec#using-the-contentfiles-element-for-content-files
Additional optional metadata for ContentFiles:
* CodeLanguage: any (default), cs, fs, vb
* BuildAction: Compile (default), None, EmbeddedResource
* CopyToOutput: false (default) / true
* Flatten: false (default) / true
-->
<PackageFolder>contentFiles</PackageFolder>
<FrameworkSpecific>true</FrameworkSpecific>
</PackFolderKind>
<PackFolderKind Include="None" />
<!--
NOTE: these aren't strictly necessary since we turn any custom
PackageFolder metadata into a PackageFolder by making the first char lowercase
We also add singular form of the built-in plural form folders where it makes sense.
-->
<PackFolderKind Include="Lib">
<PackageFolder>lib</PackageFolder>
<FrameworkSpecific>true</FrameworkSpecific>
</PackFolderKind>
<PackFolderKind Include="Build">
<PackageFolder>build</PackageFolder>
</PackFolderKind>
<PackFolderKind Include="BuildTransitive">
<PackageFolder>buildTransitive</PackageFolder>
</PackFolderKind>
<PackFolderKind Include="Tool;Tools">
<PackageFolder>tools</PackageFolder>
<FrameworkSpecific>true</FrameworkSpecific>
</PackFolderKind>
<PackFolderKind Include="Native">
<PackageFolder>native</PackageFolder>
</PackFolderKind>
<PackFolderKind Include="Runtime;Runtimes">
<PackageFolder>runtimes</PackageFolder>
</PackFolderKind>
<PackFolderKind Include="Ref">
<PackageFolder>ref</PackageFolder>
</PackFolderKind>
<PackFolderKind Include="Analyzer;Analyzers">
<PackageFolder>analyzers</PackageFolder>
</PackFolderKind>
<PackFolderKind Include="Source">
<PackageFolder>source</PackageFolder>
</PackFolderKind>
<!-- For unknown PackageFolder we apply the heuristics of turning the metadata value into pascalCase
and using that as the package folder (i.e. 'Workbooks' -> 'workbooks') -->
<!-- Finally, specially treated items that we include here for completeness and documentation -->
<!-- PackageReference items end up as Dependency -->
<!-- Project references that build packages also end up as package dependencies -->
<PackFolderKind Include="Dependency">
<!-- See https://github.com/NuGet/Home/wiki/PackageReference-Specification for the available metadata -->
<FrameworkSpecific>true</FrameworkSpecific>
</PackFolderKind>
<!-- The package metadata item if the project generates a package -->
<PackFolderKind Include="Metadata" />
<!-- Platform targets could turn @(ReferencePath) with ResolvedFrom={TargetFrameworkDirectory} to FrameworkReference, for example -->
<PackFolderKind Include="FrameworkReference">
<FrameworkSpecific>true</FrameworkSpecific>
</PackFolderKind>
</ItemGroup>
<Target Name="_GetPackFolders" Returns="@(PackFolderKind)" />
<!-- Redefined in Current\Bin\Microsoft.Common.CurrentVersion.targets. See PackageOutputGroup target -->
<Target Name="AllProjectOutputGroups" />
<!-- Redefined in Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets -->
<Target Name="RunResolvePackageDependencies" />
<!-- Redefined either in Microsoft.Common.CurrentVersion.targets or Microsoft.SourceLink
See also https://github.com/dotnet/msbuild/issues/3294
-->
<Target Name="InitializeSourceControlInformation" />
<PropertyGroup Label="Hidden">
<!-- Flag this project as having been "nugetized" -->
<IsNuGetized>true</IsNuGetized>
<NuGetizerPropsImported>true</NuGetizerPropsImported>
</PropertyGroup>
<Import Project="NuGetizer.Version.props" />
<Import Project="NuGetizer.Inference.props" Condition="'$(EnablePackInference)' != 'false'" />
<Import Project="NuGetizer.Authoring.props" Condition="'$(IsPackagingProject)' == 'true'" />
<Import Project="dotnet-nugetize.props" Condition="'$(dotnet-nugetize)' != ''"/>
</Project>