-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Microsoft.NET.Sdk.props
172 lines (139 loc) · 10.9 KB
/
Microsoft.NET.Sdk.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
<!--
***********************************************************************************************
Microsoft.NET.Sdk.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>
<!-- This property disables the conflict resolution logic from the Microsoft.Packaging.Tools package, which is superceded by the logic here in the SDK -->
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts>
</PropertyGroup>
<!-- Default configuration and platform to Debug|AnyCPU-->
<PropertyGroup>
<Configurations Condition=" '$(Configurations)' == '' ">Debug;Release</Configurations>
<Platforms Condition=" '$(Platforms)' == '' ">AnyCPU</Platforms>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
</PropertyGroup>
<!-- Default the value of PackRelease for every project. Note that this is pre-evaluated by the CLI in an evaluation before evaluation (see ReleasePropertyProjectLocator.cs).
Multitargeting pack splits a single 2 TFM project into 9 separate evaluations, with different target imports. Microsoft.NET.SDK.DefaultItems.Targets ...
is where PublishRelease is defaulted because it depends on _TargetFrameworkVersionWithoutV. Some targets do not run in some instances of dotnet pack.
So, we must set PackRelease here. Even though this occurs before project import, the project import can override PackRelease later, before the pre-evaluation, so this is fine.-->
<PropertyGroup Condition="'$(PackRelease)' == ''">
<!-- Do not depend on this value being correct until after project evaluation.-->
<PackRelease>true</PackRelease>
</PropertyGroup>
<!-- User-facing configuration-agnostic defaults -->
<PropertyGroup>
<OutputType Condition=" '$(OutputType)' == '' ">Library</OutputType>
<FileAlignment Condition=" '$(FileAlignment)' == '' ">512</FileAlignment>
<ErrorReport Condition=" '$(ErrorReport)' == '' ">prompt</ErrorReport>
<AssemblyName Condition=" '$(AssemblyName)' == '' ">$(MSBuildProjectName)</AssemblyName>
<RootNamespace Condition=" '$(RootNamespace)' == '' ">$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<Deterministic Condition=" '$(Deterministic)' == '' ">true</Deterministic>
</PropertyGroup>
<!-- User-facing configuration-specific defaults -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols Condition=" '$(DebugSymbols)' == '' ">true</DebugSymbols>
<Optimize Condition=" '$(Optimize)' == '' ">false</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>
<!-- User-facing platform-specific defaults -->
<!--
NOTE:
* We cannot compare against $(Platform) directly as that will give VS cause to instantiate extra
configurations, for each combination, which leads to performance problems and clutter in the sln
in the common AnyCPU-only case.
* We cannot just set $(PlatformTarget) to $(Platform) here because $(Platform) can be set to anything
at the solution level, but there are a fixed set valid $(PlatformTarget) values that can be passed
to the compiler. It is up to the user to explicitly set PlatformTarget to non-AnyCPU (if desired)
outside the 1:1 defaults below.
-->
<PropertyGroup>
<_PlatformWithoutConfigurationInference>$(Platform)</_PlatformWithoutConfigurationInference>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'x64' ">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'x86' ">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'ARM' ">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">ARM</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(_PlatformWithoutConfigurationInference)' == 'arm64' ">
<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">arm64</PlatformTarget>
</PropertyGroup>
<!-- Default settings for all projects built with this Sdk package -->
<PropertyGroup Condition=" '$(AssemblySearchPaths)' == '' ">
<!-- By default exclude GAC, registry, output directory from search paths. -->
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseCandidateAssemblyFiles)' != 'false'">{CandidateAssemblyFiles}</AssemblySearchPaths>
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseHintPathFromItem)' != 'false'">$(AssemblySearchPaths);{HintPathFromItem}</AssemblySearchPaths>
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseTargetFrameworkDirectory)' != 'false'">$(AssemblySearchPaths);{TargetFrameworkDirectory}</AssemblySearchPaths>
<AssemblySearchPaths Condition="'$(AssemblySearchPath_UseRawFileName)' != 'false'">$(AssemblySearchPaths);{RawFileName}</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup>
<DebugType Condition=" '$(DebugType)' == '' ">portable</DebugType>
<!-- This will turn off the base UWP-specific 'ResolveNuGetPackages' target -->
<ResolveNuGetPackages>false</ResolveNuGetPackages>
<!-- Skip import of Microsoft.NuGet.props and Microsoft.NuGet.targets -->
<SkipImportNuGetProps>true</SkipImportNuGetProps>
<SkipImportNuGetBuildTargets>true</SkipImportNuGetBuildTargets>
<!-- NuGet should always restore .NET SDK projects with "PackageReference" style restore. Setting this property will
cause the right thing to happen even if there aren't any PackageReference items in the project, such as when
a project targets .NET Framework and doesn't have any direct package dependencies. -->
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<DesignTimeAssemblySearchPaths Condition=" '$(DesignTimeAssemblySearchPaths)' == '' ">$(AssemblySearchPaths)</DesignTimeAssemblySearchPaths>
<AllowUnsafeBlocks Condition="'$(AllowUnsafeBlocks)'==''">false</AllowUnsafeBlocks>
<TreatWarningsAsErrors Condition="'$(TreatWarningsAsErrors)'==''">false</TreatWarningsAsErrors>
<Prefer32Bit Condition="'$(Prefer32Bit)'==''">false</Prefer32Bit>
<SignAssembly Condition="'$(SignAssembly)'==''">false</SignAssembly>
<DelaySign Condition="'$(DelaySign)'==''">false</DelaySign>
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)'==''">false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance Condition="'$(PackageRequireLicenseAcceptance)'==''">false</PackageRequireLicenseAcceptance>
<DebugSymbols Condition="'$(DebugSymbols)'==''">false</DebugSymbols>
<CheckForOverflowUnderflow Condition="'$(CheckForOverflowUnderflow)'==''">false</CheckForOverflowUnderflow>
<AutomaticallyUseReferenceAssemblyPackages Condition="'$(AutomaticallyUseReferenceAssemblyPackages)'==''">true</AutomaticallyUseReferenceAssemblyPackages>
<MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion>1.0.3</MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion>
<CopyConflictingTransitiveContent>false</CopyConflictingTransitiveContent>
<MSBuildCopyContentTransitively Condition="'$(MSBuildCopyContentTransitively)' == ''">true</MSBuildCopyContentTransitively>
<ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts Condition="'$(ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts)' == ''">true</ResolveAssemblyReferenceOutputUnresolvedAssemblyConflicts>
<!-- Uncomment this once https://github.com/Microsoft/visualfsharp/issues/3207 gets fixed -->
<!-- <WarningsAsErrors>$(WarningsAsErrors);NU1605</WarningsAsErrors> -->
</PropertyGroup>
<PropertyGroup>
<!-- Path to project that the .NET CLI will build in order to generate deps.json files for .NET CLI tools -->
<ToolDepsJsonGeneratorProject>$(MSBuildThisFileDirectory)GenerateDeps\GenerateDeps.proj</ToolDepsJsonGeneratorProject>
</PropertyGroup>
<!-- Default item includes (globs and implicit references) -->
<Import Project="Microsoft.NET.Sdk.DefaultItems.props" />
<!-- Put workload resolution behind a feature flag. It can be enabled either by setting the MSBuildEnableWorkloadResolver environment variable to true, or by
putting an EnableWorkloadResolver.sentinel file beside the MSBuild SDK resolver DLL -->
<PropertyGroup Condition="'$(MSBuildEnableWorkloadResolver)' == ''">
<__DisableWorkloadResolverSentinelPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildBinPath)\DisableWorkloadResolver.sentinel</__DisableWorkloadResolverSentinelPath>
<__DisableWorkloadResolverSentinelPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildToolsPath32)\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver\DisableWorkloadResolver.sentinel</__DisableWorkloadResolverSentinelPath>
<MSBuildEnableWorkloadResolver Condition="!Exists('$(__DisableWorkloadResolverSentinelPath)')">true</MSBuildEnableWorkloadResolver>
</PropertyGroup>
<!-- Import workload props -->
<Import Project="Microsoft.NET.Sdk.ImportWorkloads.props" Condition="'$(MSBuildEnableWorkloadResolver)' == 'true'" />
<!-- List of supported .NET Core and .NET Standard TFMs -->
<Import Project="Microsoft.NET.SupportedTargetFrameworks.props" />
<!-- List of supported target platforms -->
<Import Project="Microsoft.NET.SupportedPlatforms.props" />
<!-- List of supported .NET windows target platform versions -->
<Import Project="Microsoft.NET.WindowsSdkSupportedTargetPlatforms.props" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.SourceLink.props" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.CSharp.props" Condition="'$(MSBuildProjectExtension)' == '.csproj'" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.VisualBasic.props" Condition="'$(MSBuildProjectExtension)' == '.vbproj'" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.FSharp.props" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PackTool.props" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.PackProjectTool.props" />
<Import Project="$(MSBuildThisFileDirectory)../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props" Condition="Exists('$(MSBuildThisFileDirectory)../../Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props')" />
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NET.Windows.props" />
</Project>