runtime

Форк
0
/
Directory.Build.props 
489 строк · 38.5 Кб
1
<Project>
2
  <PropertyGroup>
3
    <!-- For non-SDK projects that import this file and then import Microsoft.Common.props,
4
         tell Microsoft.Common.props not to import Directory.Build.props again. -->
5
    <ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
6
    <!-- Used to determine if we should build some packages only once across multiple official build legs.
7
         For offline builds we still set OfficialBuildId but we need to build all the packages for a single
8
         leg only, so we also take DotNetBuildSourceOnly into account. -->
9
    <BuildingAnOfficialBuildLeg Condition="'$(BuildingAnOfficialBuildLeg)' == '' and '$(OfficialBuildId)' != '' and '$(DotNetBuildSourceOnly)' != 'true'">true</BuildingAnOfficialBuildLeg>
10
    <!-- When doing a source build, we want to build the various text-only manifests in
11
         all cases, rather than ordinarily where we build them during mobile or wasm
12
         build legs. This makes the manifests available on source-only builds. -->
13
    <ForceBuildMobileManifests Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</ForceBuildMobileManifests>
14
    <!-- Propagate the configuration and platform to project references. When building in VS, this defaults to true.
15
         Explicitly setting it to false ensures projects are built in the corresponding configuration both in VS and on the command line. -->
16
    <ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform>
17
  </PropertyGroup>
18

19
  <PropertyGroup Label="CalculateTargetOS">
20
    <_hostOS>linux</_hostOS>
21
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</_hostOS>
22
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('FREEBSD'))">freebsd</_hostOS>
23
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('NETBSD'))">netbsd</_hostOS>
24
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</_hostOS>
25
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('SOLARIS'))">solaris</_hostOS>
26
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('HAIKU'))">haiku</_hostOS>
27
    <_hostOS Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))">windows</_hostOS>
28
    <HostOS>$(_hostOS)</HostOS>
29
    <TargetOS Condition="'$(TargetOS)' == '' and '$(RuntimeIdentifier)' == 'browser-wasm'">browser</TargetOS>
30
    <TargetOS Condition="'$(TargetOS)' == ''">$(_hostOS)</TargetOS>
31
    <TargetsMobile Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator' or '$(TargetOS)' == 'android' or '$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'">true</TargetsMobile>
32
    <TargetsAppleMobile Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator' or '$(TargetOS)' == 'maccatalyst' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'">true</TargetsAppleMobile>
33
  </PropertyGroup>
34

35
  <!-- Platform property is required by RepoLayout.props in Arcade SDK. -->
36
  <PropertyGroup Label="CalculateArch">
37
    <_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</_hostArch>
38
    <BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$(_hostArch)</BuildArchitecture>
39
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and ('$(TargetOS)' == 'browser' or '$(RuntimeIdentifier)' == 'browser-wasm')">wasm</TargetArchitecture>
40
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and ('$(TargetOS)' == 'wasi' or '$(RuntimeIdentifier)' == 'wasi-wasm')">wasm</TargetArchitecture>
41
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm'">arm</TargetArchitecture>
42
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armv6'">armv6</TargetArchitecture>
43
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'armel'">armel</TargetArchitecture>
44
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm64'">arm64</TargetArchitecture>
45
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'loongarch64'">loongarch64</TargetArchitecture>
46
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 's390x'">s390x</TargetArchitecture>
47
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'ppc64le'">ppc64le</TargetArchitecture>
48
    <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetsMobile)' == 'true'">x64</TargetArchitecture>
49
    <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
50
    <Platform Condition="'$(Platform)' == '' and '$(InferPlatformFromTargetArchitecture)' == 'true'">$(TargetArchitecture)</Platform>
51
  </PropertyGroup>
52

53
  <PropertyGroup Label="SetOSTargetMinVersions">
54
    <!--
55
      Minimum target OS versions, keep in sync with:
56
        - eng/native/configurecompiler.cmake
57
        - eng/native/build-commons.sh
58
        - src/native/libs/build-native.sh
59
        - src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs
60
        - src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
61
        - src/installer/pkg/sfx/bundle/shared-framework-distribution-template-x64.xml
62
        - src/installer/pkg/sfx/bundle/shared-framework-distribution-template-arm64.xml
63
        - src/tasks/MobileBuildTasks/Apple/AppleProject.cs
64
        - dotnet/installer repo > src/redist/targets/GeneratePKG.targets
65
     -->
66
    <AndroidApiLevelMin>21</AndroidApiLevelMin>
67
    <iOSVersionMin>11.0</iOSVersionMin>
68
    <tvOSVersionMin>11.0</tvOSVersionMin>
69
    <macOSVersionMin>10.15</macOSVersionMin>
70
    <macOSVersionMin Condition="('$(TargetOS)' == 'osx' or '$(TargetOS)' == 'maccatalyst') and '$(TargetArchitecture)' == 'arm64'">11.0</macOSVersionMin>
71
  </PropertyGroup>
72

73
  <PropertyGroup>
74
    <!-- Set OutDirName (Arcade specific property that must be set before the Arcade SDK is imported) to change the BaseOutputPath and
75
         BaseIntermediateOutputPath properties to include the ref subfolder. -->
76
    <IsReferenceAssemblyProject Condition="$([System.IO.Path]::GetFileName('$(MSBuildProjectDirectory)')) == 'ref'">true</IsReferenceAssemblyProject>
77
    <OutDirName Condition="'$(IsReferenceAssemblyProject)' == 'true'">$(MSBuildProjectName)$([System.IO.Path]::DirectorySeparatorChar)ref</OutDirName>
78
  </PropertyGroup>
79

80
  <!-- Import the Arcade SDK -->
81
  <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
82

83
  <!-- The TFMs to build and test against. -->
84
  <PropertyGroup>
85
    <NetCoreAppCurrentVersion>9.0</NetCoreAppCurrentVersion>
86
    <NetCoreAppCurrentIdentifier>.NETCoreApp</NetCoreAppCurrentIdentifier>
87
    <NetCoreAppCurrentTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppCurrentVersion)</NetCoreAppCurrentTargetFrameworkMoniker>
88
    <MicrosoftNetCoreAppFrameworkName>Microsoft.NETCore.App</MicrosoftNetCoreAppFrameworkName>
89
    <NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName>
90
    <NetCoreAppCurrent>net$(NetCoreAppCurrentVersion)</NetCoreAppCurrent>
91

92
    <!-- The previous supported .NET version. -->
93
    <NetCoreAppPreviousVersion>8.0</NetCoreAppPreviousVersion>
94
    <!-- For the .NET 9 release, set NetCoreAppPrevious to empty as NuGet has issues
95
         with duplicate TFMs (when using both NetCoreAppPrevious and NetCoreAppMinimum). -->
96
    <NetCoreAppPrevious />
97

98
    <!-- The minimum supported .NET version. -->
99
    <NetCoreAppMinimum>net8.0</NetCoreAppMinimum>
100
    <NetCoreAppMinimum Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCoreAppCurrent)</NetCoreAppMinimum>
101

102
    <!-- when this is updated, make sure to keep $(_NetCoreAppToolCurrent)
103
         in src/mono/wasm/build/WasmApp.LocalBuild.props
104
         and in src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props in sync -->
105
    <NetCoreAppToolCurrentVersion>9.0</NetCoreAppToolCurrentVersion>
106
    <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
107
    <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
108

109
    <AspNetCoreAppCurrentVersion>9.0</AspNetCoreAppCurrentVersion>
110
    <AspNetCoreAppCurrent>net$(AspNetCoreAppCurrentVersion)</AspNetCoreAppCurrent>
111

112
    <NetFrameworkMinimum>net462</NetFrameworkMinimum>
113
    <NetFrameworkCurrent>net48</NetFrameworkCurrent>
114
    <NetFrameworkToolCurrent>net472</NetFrameworkToolCurrent>
115
    <!-- Don't build for NETFramework during source-build. -->
116
    <NetFrameworkMinimum Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
117
    <NetFrameworkToolCurrent Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
118
    <NetFrameworkCurrent Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
119

120
    <!-- Important: Set this to the GA version (or a close approximation) during servicing and adjust the TFM property below. -->
121
    <ApiCompatNetCoreAppBaselineVersion>8.0.0</ApiCompatNetCoreAppBaselineVersion>
122
    <ApiCompatNetCoreAppBaselineTFM>net8.0</ApiCompatNetCoreAppBaselineTFM>
123
  </PropertyGroup>
124

125
  <PropertyGroup Label="CalculateConfiguration">
126
    <!-- The RuntimeConfiguration property allows to pass in/specify a configuration that applies to both CoreCLR and Mono. -->
127
    <RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == ''">$(Configuration)</RuntimeConfiguration>
128
    <RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == '' and ('$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release')">$(Configuration)</RuntimeConfiguration>
129
    <RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == ''">Debug</RuntimeConfiguration>
130
    <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(RuntimeConfiguration)</CoreCLRConfiguration>
131
    <MonoConfiguration Condition="'$(MonoConfiguration)' == '' and '$(RuntimeConfiguration.ToLower())' != 'checked'">$(RuntimeConfiguration)</MonoConfiguration>
132
    <!-- There's no checked configuration on Mono. -->
133
    <MonoConfiguration Condition="'$(MonoConfiguration)' == '' and '$(RuntimeConfiguration.ToLower())' == 'checked'">Debug</MonoConfiguration>
134
    <LibrariesConfiguration Condition="'$(LibrariesConfiguration)' == ''">$(Configuration)</LibrariesConfiguration>
135
    <HostConfiguration Condition="'$(HostConfiguration)' == ''">$(Configuration)</HostConfiguration>
136
    <TasksConfiguration Condition="'$(TasksConfiguration)' == ''">$(Configuration)</TasksConfiguration>
137
    <ToolsConfiguration Condition="'$(ToolsConfiguration)' == ''">$(Configuration)</ToolsConfiguration>
138
  </PropertyGroup>
139

140
  <PropertyGroup>
141
    <LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'libraries'))</LibrariesProjectRoot>
142
    <CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'coreclr'))</CoreClrProjectRoot>
143
    <MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'mono'))</MonoProjectRoot>
144
    <InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'installer'))</InstallerProjectRoot>
145
    <WorkloadsProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'workloads'))</WorkloadsProjectRoot>
146
    <ToolsProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tools'))</ToolsProjectRoot>
147
    <SharedNativeRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'native'))</SharedNativeRoot>
148
    <RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tasks'))</RepoTasksDir>
149
    <IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
150
    <MibcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'mibc'))</MibcOptimizationDataDir>
151
    <DocsDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'docs'))</DocsDir>
152
    <BrowserProjectRoot>$([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'browser'))</BrowserProjectRoot>
153
    <WasmProjectRoot>$([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasm'))</WasmProjectRoot>
154
    <WasiProjectRoot>$([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasi'))</WasiProjectRoot>
155

156
    <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir>
157
    <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir>
158
    <MobileBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MobileBuildTasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</MobileBuildTasksDir>
159
    <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</WasmAppBuilderDir>
160
    <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir>
161
    <WorkloadBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WorkloadBuildTasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</WorkloadBuildTasksDir>
162
    <LibraryBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'LibraryBuilder', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</LibraryBuilderDir>
163
    <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir>
164
    <MonoTargetsTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoTargetsTasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</MonoTargetsTasksDir>
165
    <TestExclusionListTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'TestExclusionListTasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)'))</TestExclusionListTasksDir>
166
    <InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
167
    <InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', '$(TasksConfiguration)', '$(NetFrameworkToolCurrent)', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
168
    <Crossgen2SdkOverridePropsPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Crossgen2Tasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)', 'Microsoft.NET.CrossGen.props'))</Crossgen2SdkOverridePropsPath>
169
    <Crossgen2SdkOverrideTargetsPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Crossgen2Tasks', '$(TasksConfiguration)', '$(NetCoreAppToolCurrent)', 'Microsoft.NET.CrossGen.targets'))</Crossgen2SdkOverrideTargetsPath>
170
    <AppleAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))</AppleAppBuilderTasksAssemblyPath>
171
    <AndroidAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll'))</AndroidAppBuilderTasksAssemblyPath>
172
    <MobileBuildTasksAssemblyPath>$([MSBuild]::NormalizePath('$(MobileBuildTasksDir)', 'MobileBuildTasks.dll'))</MobileBuildTasksAssemblyPath>
173
    <WasmAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll'))</WasmAppBuilderTasksAssemblyPath>
174
    <WasmBuildTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll'))</WasmBuildTasksAssemblyPath>
175
    <WasmAppHostDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppHost', 'wasm', '$(Configuration)'))</WasmAppHostDir>
176
    <WorkloadBuildTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WorkloadBuildTasksDir)', 'WorkloadBuildTasks.dll'))</WorkloadBuildTasksAssemblyPath>
177
    <LibraryBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(LibraryBuilderDir)', 'LibraryBuilder.dll'))</LibraryBuilderTasksAssemblyPath>
178
    <MonoAOTCompilerTasksAssemblyPath>$([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll'))</MonoAOTCompilerTasksAssemblyPath>
179
    <MonoTargetsTasksAssemblyPath>$([MSBuild]::NormalizePath('$(MonoTargetsTasksDir)', 'MonoTargetsTasks.dll'))</MonoTargetsTasksAssemblyPath>
180
    <TestExclusionListTasksAssemblyPath>$([MSBuild]::NormalizePath('$(TestExclusionListTasksDir)', 'TestExclusionListTasks.dll'))</TestExclusionListTasksAssemblyPath>
181
    <CoreCLRToolPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'coreclr', '$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)'))</CoreCLRToolPath>
182
    <ILAsmToolPath Condition="'$(DotNetBuildSourceOnly)' == 'true' or '$(BuildArchitecture)' == 's390x' or '$(BuildArchitecture)' == 'ppc64le'">$(CoreCLRToolPath)</ILAsmToolPath>
183
    <WasmtimeDir Condition="'$(WasmtimeDir)' == '' and '$(WASMTIME_PATH)' != '' and Exists($(WASMTIME_PATH))">$(WASMTIME_PATH)</WasmtimeDir>
184
    <WasmtimeDir Condition="'$(WasmtimeDir)' == ''">$([MSBuild]::NormalizeDirectory($(ArtifactsObjDir), 'wasmtime'))</WasmtimeDir>
185
    <InstallWasmtimeForTests Condition="'$(InstallWasmtimeForTests)' == '' and !Exists($(WasmtimeDir))">true</InstallWasmtimeForTests>
186
    <WasmCommonTargetsPath>$([MSBuild]::NormalizeDirectory($(WasmProjectRoot), 'build'))</WasmCommonTargetsPath>
187
  </PropertyGroup>
188

189
  <PropertyGroup Label="CalculatePortableBuild">
190
    <PortableBuild Condition="'$(PortableBuild)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">false</PortableBuild>
191
    <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
192
  </PropertyGroup>
193

194
  <!-- _portableOS is the portable rid-OS corresponding to the target platform. -->
195
  <PropertyGroup Label="CalculatePortableOS">
196
    <!-- To determine _portableOS we use TargetOS.
197
         TargetOS is not a rid-OS. For example: for Windows it is 'windows' instead of 'win'.
198
         And, for flavors of Linux, like 'linux-musl' and 'linux-bionic', TargetOS is 'linux'. -->
199

200
    <_portableOS>$(TargetOS.ToLowerInvariant())</_portableOS>
201
    <_portableOS Condition="'$(_portableOS)' == 'windows'">win</_portableOS>
202

203
    <!-- TargetOS=AnyOS is a sentinel value used by tests, ignore it.  -->
204
    <_portableOS Condition="'$(_portableOS)' == 'anyos'">$(__PortableTargetOS)</_portableOS>
205

206
    <!-- Detect linux flavors using __PortableTargetOS from the native script. -->
207
    <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-musl'">linux-musl</_portableOS>
208
    <_portableOS Condition="'$(_portableOS)' == 'linux' and '$(__PortableTargetOS)' == 'linux-bionic'">linux-bionic</_portableOS>
209

210
    <!-- On Windows, we can build for Windows and Mobile.
211
         For other TargetOSes, create a "win" build, built from TargetOS sources and "win" pre-built packages. -->
212
    <_portableOS Condition="'$(HostOS)' == 'win' and '$(TargetsMobile)' != 'true'">win</_portableOS>
213
  </PropertyGroup>
214

215
  <!-- PackageRID is used for packages needed for the target. -->
216
  <PropertyGroup Label="CalculatePackageRID">
217
    <_packageOS>$(_portableOS)</_packageOS>
218

219
    <_packageOS Condition="'$(CrossBuild)' == 'true' and '$(_portableOS)' != 'linux-musl' and '$(_portableOS)' != 'linux-bionic'">$(_hostOS)</_packageOS>
220

221
    <!-- source-build sets PackageOS to build with non-portable rid packages that were source-built previously. -->
222
    <PackageRID Condition="'$(PackageOS)' != ''">$(PackageOS)-$(TargetArchitecture)</PackageRID>
223
    <PackageRID Condition="'$(PackageRID)' == ''">$(_packageOS)-$(TargetArchitecture)</PackageRID>
224
  </PropertyGroup>
225

226
  <!-- ToolsRID is used for packages needed on the build host. -->
227
  <PropertyGroup Label="CalculateToolsRID">
228
    <!-- _portableHostOS is the portable rid-OS corresponding to the build host platform.
229

230
         To determine _portableHostOS we use _hostOS, similar to how _portableOS is calculated from TargetOS.
231

232
         When we're not cross-building we can detect linux flavors by looking at _portableOS
233
         because the target platform and the build host platform are the same.
234
         For cross-builds, we're currently unable to detect the flavors. -->
235
    <_portableHostOS>$(_hostOS)</_portableHostOS>
236
    <_portableHostOS Condition="'$(_portableHostOS)' == 'windows'">win</_portableHostOS>
237
    <_portableHostOS Condition="'$(CrossBuild)' != 'true' and '$(_portableOS)' == 'linux-musl'">linux-musl</_portableHostOS>
238

239
    <!-- source-build sets ToolsOS to build with non-portable rid packages that were source-built previously. -->
240
    <ToolsRID Condition="'$(ToolsOS)' != ''">$(ToolsOS)-$(_hostArch)</ToolsRID>
241
    <ToolsRID Condition="'$(ToolsRID)' == ''">$(_portableHostOS)-$(_hostArch)</ToolsRID>
242

243
    <!-- Microsoft.NET.Sdk.IL SDK defaults to the portable host rid. Match it to ToolsRID (for source-build). -->
244
    <MicrosoftNetCoreIlasmPackageRuntimeId>$(ToolsRID)</MicrosoftNetCoreIlasmPackageRuntimeId>
245
  </PropertyGroup>
246

247
  <!-- OutputRID is used to name the target platform.
248
       For portable builds, OutputRID matches _portableOS.
249
       For non-portable builds, it uses __DistroRid (from the native build script), or falls back to RuntimeInformation.RuntimeIdentifier.
250
       Source-build sets OutputRID directly. -->
251
  <PropertyGroup Label="CalculateOutputRID">
252
    <_hostRid Condition="'$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</_hostRid>
253
    <_hostRid Condition="'$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</_hostRid>
254

255
    <_parseDistroRid>$(__DistroRid)</_parseDistroRid>
256
    <_parseDistroRid Condition="'$(_parseDistroRid)' == ''">$(_hostRid)</_parseDistroRid>
257
    <_distroRidIndex>$(_parseDistroRid.LastIndexOf('-'))</_distroRidIndex>
258

259
    <_outputOS>$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</_outputOS>
260
    <_outputOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)</_outputOS>
261

262
    <OutputRID Condition="'$(OutputRID)' == ''">$(_outputOS)-$(TargetArchitecture)</OutputRID>
263
  </PropertyGroup>
264

265
  <PropertyGroup Label="CalculateTargetOSName">
266
    <TargetsFreeBSD Condition="'$(TargetOS)' == 'freebsd'">true</TargetsFreeBSD>
267
    <Targetsillumos Condition="'$(TargetOS)' == 'illumos'">true</Targetsillumos>
268
    <TargetsSolaris Condition="'$(TargetOS)' == 'solaris'">true</TargetsSolaris>
269
    <TargetsHaiku Condition="'$(TargetOS)' == 'haiku'">true</TargetsHaiku>
270
    <TargetsLinux Condition="'$(TargetOS)' == 'linux' or '$(TargetOS)' == 'android'">true</TargetsLinux>
271
    <TargetsLinuxBionic Condition="'$(_portableOS)' == 'linux-bionic'">true</TargetsLinuxBionic>
272
    <TargetsLinuxMusl Condition="'$(_portableOS)' == 'linux-musl'">true</TargetsLinuxMusl>
273
    <TargetsNetBSD Condition="'$(TargetOS)' == 'netbsd'">true</TargetsNetBSD>
274
    <TargetsOSX Condition="'$(TargetOS)' == 'osx'">true</TargetsOSX>
275
    <TargetsMacCatalyst Condition="'$(TargetOS)' == 'maccatalyst'">true</TargetsMacCatalyst>
276
    <TargetsiOS Condition="'$(TargetOS)' == 'ios' or '$(TargetOS)' == 'iossimulator'">true</TargetsiOS>
277
    <TargetstvOS Condition="'$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'tvossimulator'">true</TargetstvOS>
278
    <TargetsiOSSimulator Condition="'$(TargetOS)' == 'iossimulator'">true</TargetsiOSSimulator>
279
    <TargetstvOSSimulator Condition="'$(TargetOS)' == 'tvossimulator'">true</TargetstvOSSimulator>
280
    <TargetsAndroid Condition="'$(TargetOS)' == 'android'">true</TargetsAndroid>
281
    <TargetsBrowser Condition="'$(TargetOS)' == 'browser'">true</TargetsBrowser>
282
    <TargetsWasi Condition="'$(TargetOS)' == 'wasi'">true</TargetsWasi>
283
    <TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows>
284
    <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsHaiku)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetsMacCatalyst)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix>
285
  </PropertyGroup>
286

287
  <PropertyGroup>
288
    <MicrosoftNetCoreAppRefPackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.ref'))</MicrosoftNetCoreAppRefPackDir>
289
    <MicrosoftNetCoreAppRefPackRefDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'ref', '$(NetCoreAppCurrent)'))</MicrosoftNetCoreAppRefPackRefDir>
290
    <MicrosoftNetCoreAppRefPackDataDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRefPackDir)', 'data'))</MicrosoftNetCoreAppRefPackDataDir>
291

292
    <MicrosoftNetCoreAppRuntimePackDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'microsoft.netcore.app.runtime.$(OutputRID)', '$(LibrariesConfiguration)'))</MicrosoftNetCoreAppRuntimePackDir>
293
    <MicrosoftNetCoreAppRuntimePackRidDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackDir)', 'runtimes', '$(OutputRID)'))</MicrosoftNetCoreAppRuntimePackRidDir>
294
    <MicrosoftNetCoreAppRuntimePackRidLibTfmDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackRidDir)', 'lib', '$(NetCoreAppCurrent)'))</MicrosoftNetCoreAppRuntimePackRidLibTfmDir>
295
    <MicrosoftNetCoreAppRuntimePackNativeDir>$([MSBuild]::NormalizeDirectory('$(MicrosoftNetCoreAppRuntimePackRidDir)', 'native'))</MicrosoftNetCoreAppRuntimePackNativeDir>
296
  </PropertyGroup>
297

298
  <PropertyGroup>
299
    <DotNetHostBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', '$(OutputRID).$(HostConfiguration)', 'corehost'))</DotNetHostBinDir>
300
  </PropertyGroup>
301

302
  <!--Feature switches -->
303
  <PropertyGroup>
304
    <NoPgoOptimize Condition="'$(NoPgoOptimize)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">true</NoPgoOptimize>
305
    <EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">false</EnableNgenOptimization>
306
    <EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and ('$(Configuration)' == 'Release' or '$(Configuration)' == 'Checked')">true</EnableNgenOptimization>
307
    <!-- Enable NuGet static graph evaluation to optimize incremental restore -->
308
    <RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
309
    <!-- Turn off end of life target framework checks as we intentionally build older .NETCoreApp configurations. -->
310
    <CheckEolTargetFramework>false</CheckEolTargetFramework>
311
    <!-- Turn off workload support until we support them. -->
312
    <MSBuildEnableWorkloadResolver>false</MSBuildEnableWorkloadResolver>
313
    <!-- Disable source link when building locally. -->
314
    <DisableSourceLink Condition="'$(DisableSourceLink)' == '' and
315
                                  '$(ContinuousIntegrationBuild)' != 'true' and
316
                                  '$(OfficialBuildId)' == ''">true</DisableSourceLink>
317
    <!-- Runtime doesn't support Arcade-driven target framework filtering. -->
318
    <NoTargetFrameworkFiltering>true</NoTargetFrameworkFiltering>
319

320
    <NativeBuildPartitionPropertiesToRemove>ClrFullNativeBuild;ClrRuntimeSubset;ClrJitSubset;ClrPalTestsSubset;ClrAllJitsSubset;ClrILToolsSubset;ClrNativeAotSubset;ClrSpmiSubset;ClrCrossComponentsSubset;ClrDebugSubset;HostArchitecture;PgoInstrument;NativeOptimizationDataSupported;CMakeArgs</NativeBuildPartitionPropertiesToRemove>
321
  </PropertyGroup>
322

323
  <!-- RepositoryEngineeringDir isn't set when Installer tests import this file. -->
324
  <Import Project="$(RepositoryEngineeringDir)native\naming.props" />
325
  <Import Project="$(RepositoryEngineeringDir)Subsets.props" />
326

327
  <PropertyGroup>
328
    <CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir>
329
    <CoreLibRefDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'ref'))</CoreLibRefDir>
330
    <CoreLibProject Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
331
    <CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
332
    <CoreLibProject Condition="'$(UseNativeAotCoreLib)' == 'true'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'nativeaot', 'System.Private.CoreLib', 'src', 'System.Private.CoreLib.csproj'))</CoreLibProject>
333
    <UriProject>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'System.Private.Uri', 'src', 'System.Private.Uri.csproj'))</UriProject>
334

335
    <!-- this property is used by the SDK to pull in mono-based runtime packs -->
336
    <UseMonoRuntime Condition="'$(UseMonoRuntime)' == '' and '$(RuntimeFlavor)' == 'Mono'">true</UseMonoRuntime>
337

338
    <!-- For enabling the use of XUnitLogChecker in coreclr and libraries test runs. -->
339
    <!-- TODO: Enable XUnitLogChecker for NativeAOT tests https://github.com/dotnet/runtime/issues/94722 -->
340
    <IsXUnitLogCheckerSupported Condition="'$(IsXUnitLogCheckerSupported)' == ''">false</IsXUnitLogCheckerSupported>
341
    <IsXUnitLogCheckerSupported Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(TestNativeAot)' != 'true' and '$(RunNativeAotTestApps)' != 'true' and '$(TestSingleFile)' != 'true' and '$(TargetOS)' != 'browser' and '$(TargetOS)' != 'wasi' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator' and '$(TargetOS)' != 'tvos' and '$(TargetOS)' != 'tvossimulator' and '$(TargetOS)' != 'maccatalyst' and '$(TargetOS)' != 'android'">true</IsXUnitLogCheckerSupported>
342
    <XUnitLogCheckerLibrariesOutDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'XUnitLogChecker'))</XUnitLogCheckerLibrariesOutDir>
343
  </PropertyGroup>
344

345
  <!-- Packaging -->
346
  <PropertyGroup>
347
    <GitHubRepositoryName>runtime</GitHubRepositoryName>
348
    <RepositoryUrl>https://github.com/dotnet/$(GitHubRepositoryName)</RepositoryUrl>
349
    <PackageProjectUrl>https://dot.net</PackageProjectUrl>
350
    <Owners>microsoft,dotnetframework</Owners>
351
    <IncludeSymbols>true</IncludeSymbols>
352
    <LicenseFile>$(MSBuildThisFileDirectory)LICENSE.TXT</LicenseFile>
353
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
354
    <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
355
    <Copyright>$(CopyrightNetFoundation)</Copyright>
356
    <PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
357
    <PackageReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</PackageReleaseNotes>
358
    <IsPrivateAssembly>$(MSBuildProjectName.Contains('Private'))</IsPrivateAssembly>
359
    <!-- Private packages should not be stable -->
360
    <SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsPrivateAssembly)">true</SuppressFinalPackageVersion>
361
    <!-- We don't want Private packages to be shipped to NuGet.org -->
362
    <IsShippingPackage Condition="$(IsPrivateAssembly)">false</IsShippingPackage>
363
    <PlaceholderFile>$(RepositoryEngineeringDir)_._</PlaceholderFile>
364
  </PropertyGroup>
365

366
  <!-- Flow these properties to consuming projects. -->
367
  <ItemDefinitionGroup>
368
    <TargetPathWithTargetPlatformMoniker>
369
      <IsPrivateAssembly>$(IsPrivateAssembly.ToLowerInvariant())</IsPrivateAssembly>
370
    </TargetPathWithTargetPlatformMoniker>
371
  </ItemDefinitionGroup>
372

373
  <!-- Language configuration -->
374
  <PropertyGroup>
375
    <!-- default to allowing all language features -->
376
    <LangVersion>preview</LangVersion>
377
    <!-- default to max warnlevel -->
378
    <AnalysisLevel Condition="'$(MSBuildProjectExtension)' == '.csproj'">preview</AnalysisLevel>
379
    <LangVersion Condition="'$(MSBuildProjectExtension)' == '.vbproj'">latest</LangVersion>
380
    <!-- Enables Strict mode for Roslyn compiler -->
381
    <Features>strict;nullablePublicOnly</Features>
382
    <TreatWarningsAsErrors Condition="'$(TreatWarningsAsErrors)' == ''">true</TreatWarningsAsErrors>
383
    <!-- Warnings to always disable -->
384
    <NoWarn>$(NoWarn),CS8969</NoWarn>
385
    <!-- Always pass portable to override arcade sdk which uses embedded for local builds -->
386
    <DebugType>portable</DebugType>
387
    <DebugSymbols>true</DebugSymbols>
388
    <KeepNativeSymbols Condition="'$(KeepNativeSymbols)' == '' and '$(DotNetBuildSourceOnly)' == 'true'">true</KeepNativeSymbols>
389
    <KeepNativeSymbols Condition="'$(KeepNativeSymbols)' == ''">false</KeepNativeSymbols>
390
    <!-- Used for launchSettings.json and runtime config files. -->
391
    <AppDesignerFolder>Properties</AppDesignerFolder>
392
    <!-- By default the SDK produces ref assembly for 5.0 or later -->
393
    <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
394
  </PropertyGroup>
395

396
  <!-- Define test projects and companions -->
397
  <PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('$([System.IO.Path]::DirectorySeparatorChar)tests$([System.IO.Path]::DirectorySeparatorChar)'))">
398
    <IsTestProject Condition="$(MSBuildProjectName.EndsWith('.UnitTests')) or $(MSBuildProjectName.EndsWith('.Tests'))">true</IsTestProject>
399
    <IsTrimmingTestProject Condition="$(MSBuildProjectName.EndsWith('.TrimmingTests'))">true</IsTrimmingTestProject>
400
    <IsNativeAotTestProject Condition="$(MSBuildProjectName.EndsWith('.NativeAotTests'))">true</IsNativeAotTestProject>
401
    <IsPublishedAppTestProject Condition="'$(IsTrimmingTestProject)' == 'true' or '$(IsNativeAotTestProject)' == 'true'">true</IsPublishedAppTestProject>
402
    <IsTestSupportProject Condition="'$(IsTestProject)' != 'true' and '$(IsPublishedAppTestProject)' != 'true'">true</IsTestSupportProject>
403

404
    <!-- Treat test assemblies as non-shipping (do not publish or sign them). -->
405
    <IsShipping Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsPublishedAppTestProject)' == 'true'">false</IsShipping>
406
  </PropertyGroup>
407

408
  <PropertyGroup>
409
    <!-- Treat as a generator project if either the parent or the parent parent directory is named gen. -->
410
    <IsGeneratorProject Condition="$([System.IO.Path]::GetFileName('$(MSBuildProjectDirectory)')) == 'gen' or
411
                                   $([System.IO.Path]::GetFileName('$([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..'))')) == 'gen'">true</IsGeneratorProject>
412
    <IsSourceProject Condition="'$(IsSourceProject)' == '' and
413
                                '$(IsReferenceAssemblyProject)' != 'true' and
414
                                '$(IsGeneratorProject)' != 'true' and
415
                                '$(IsTestProject)' != 'true' and
416
                                '$(IsPublishedAppTestProject)' != 'true' and
417
                                '$(IsTestSupportProject)' != 'true' and
418
                                '$(UsingMicrosoftDotNetSharedFrameworkSdk)' != 'true' and
419
                                '$(MSBuildProjectExtension)' != '.pkgproj' and
420
                                '$(UsingMicrosoftNoTargetsSdk)' != 'true' and
421
                                '$(UsingMicrosoftTraversalSdk)' != 'true'">true</IsSourceProject>
422
  </PropertyGroup>
423

424
  <PropertyGroup Condition="'$(IsReferenceAssemblyProject)' == 'true'">
425
    <!-- Reference assemblies are special and don't initialize fields or have empty finalizers, etc. -->
426
    <RunAnalyzers>false</RunAnalyzers>
427
    <!-- disable warnings about unused fields -->
428
    <NoWarn>$(NoWarn);CS0169;CS0649;CS8618</NoWarn>
429
    <!-- disable CS8597 because we throw null on reference assemblies. -->
430
    <NoWarn>$(NoWarn);CS8597</NoWarn>
431
    <!-- We base calls from constructors with null literals. -->
432
    <NoWarn>$(NoWarn);CS8625</NoWarn>
433
    <!-- We dont need to add null annotation within the ref for explicit interface methods. -->
434
    <NoWarn>$(NoWarn);CS8617</NoWarn>
435
    <!-- No symbols are produced for ref assemblies, but some parts of the SDK still expect pdbs, so we explicitly tell it there are none. -->
436
    <!-- Must be set after importing Arcade to override its defaults. -->
437
    <DebugType>none</DebugType>
438
    <!-- Don't try to publish PDBs for ref assemblies that have none. -->
439
    <PublishWindowsPdb>false</PublishWindowsPdb>
440
  </PropertyGroup>
441

442

443
  <!-- All reference assemblies should have a ReferenceAssemblyAttribute and the 0x70 flag which prevents them from loading. -->
444
  <ItemGroup Condition="'$(IsReferenceAssemblyProject)' == 'true'">
445
    <AssemblyAttribute Include="System.Runtime.CompilerServices.ReferenceAssemblyAttribute" />
446
    <AssemblyAttribute Include="System.Reflection.AssemblyFlags">
447
      <_Parameter1>(System.Reflection.AssemblyNameFlags)0x70</_Parameter1>
448
      <_Parameter1_IsLiteral>true</_Parameter1_IsLiteral>
449
    </AssemblyAttribute>
450
  </ItemGroup>
451

452
  <PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
453
    <!-- Must be defined in a props file as imports in Microsoft.DotNet.ApiCompat.Task.targets depend on it. -->
454
    <ApiCompatValidateAssemblies>true</ApiCompatValidateAssemblies>
455
  </PropertyGroup>
456

457
  <PropertyGroup Condition="'$(IsGeneratorProject)' == 'true'">
458
    <!-- Unique assembly versions increases(3x) the compiler throughput during reference package updates. -->
459
    <AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
460
    <!-- To suppress warnings about resetting the assembly version.-->
461
    <AssemblyVersion />
462
    <!-- Enforce extended rules around API usages in analyzers and generators to ensure our generators follow best practices. -->
463
    <EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
464
  </PropertyGroup>
465

466
  <!-- Warnings that should be disabled in our test projects. -->
467
  <PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true' or '$(IsPublishedAppTestProject)' == 'true'">
468
    <!-- we need to re-enable BinaryFormatter within test projects since some tests exercise these code paths to ensure compat -->
469
    <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
470
    <!-- don't warn on usage of BinaryFormatter or legacy serialization infrastructure from test projects -->
471
    <NoWarn>$(NoWarn);SYSLIB0011;SYSLIB0050;SYSLIB0051</NoWarn>
472
    <!-- don't warn about unnecessary trim warning suppressions. can be removed with preview 6. -->
473
    <NoWarn>$(NoWarn);IL2121</NoWarn>
474
    <!-- allow nullable annotated files to be incorporated into tests without warning -->
475
    <Nullable Condition="'$(Nullable)' == '' and '$(Language)' == 'C#'">annotations</Nullable>
476
  </PropertyGroup>
477

478
  <PropertyGroup>
479
    <CustomBeforeNoTargets>$(RepositoryEngineeringDir)NoTargetsSdk.BeforeTargets.targets</CustomBeforeNoTargets>
480
    <CustomAfterTraversalTargets>$(RepositoryEngineeringDir)TraversalSdk.AfterTargets.targets</CustomAfterTraversalTargets>
481
  </PropertyGroup>
482

483
  <PropertyGroup>
484
    <!-- Keep in sync with outputs defined in Microsoft.NETCore.Platforms.csproj. -->
485
    <BundledRuntimeIdentifierGraphFile>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.NETCore.Platforms', 'runtime.json'))</BundledRuntimeIdentifierGraphFile>
486
    <BundledRuntimeIdentifierGraphFile Condition="!Exists('$(BundledRuntimeIdentifierGraphFile)')">$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Microsoft.NETCore.Platforms', 'src', 'runtime.json'))</BundledRuntimeIdentifierGraphFile>
487
  </PropertyGroup>
488

489
</Project>
490

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.