-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathNuGetizer.props
139 lines (124 loc) · 6.51 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
<!--
***********************************************************************************************
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>
<ItemGroup>
<AvailableItemName Include="PackageFile" />
</ItemGroup>
<ItemDefinitionGroup>
<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>
</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>
<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="Tool;Tools">
<PackageFolder>tools</PackageFolder>
</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 Common targets. See PackageOutputGroup target -->
<Target Name="AllProjectOutputGroups" />
<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.Authoring.props" Condition="'$(IsPackagingProject)' == 'true'" />
<Import Project="dotnet-nugetize.props" Condition="'$(dotnet-nugetize)' != ''"/>
</Project>