diff options
Diffstat (limited to 'Directory.Build.props')
-rw-r--r-- | Directory.Build.props | 256 |
1 files changed, 191 insertions, 65 deletions
diff --git a/Directory.Build.props b/Directory.Build.props index d654ceb8757..3d391c4b443 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,63 +1,74 @@ -<Project TreatAsLocalProperty="RepoRoot"> - +<Project> <PropertyGroup> - <!-- - For non-SDK projects that import this file and then import Microsoft.Common.props, - tell Microsoft.Common.props not to import Directory.Build.props again - --> + <!-- For non-SDK projects that import this file and then import Microsoft.Common.props, + tell Microsoft.Common.props not to import Directory.Build.props again. --> <ImportDirectoryBuildProps>false</ImportDirectoryBuildProps> </PropertyGroup> - <!-- - Import the arcade sdk with these requirements. - After: - Configuration setup - Before: - DebugType needs to be not be set to embedded at least for facades - OutputPath setup - --> - <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" /> - - <!-- Set these properties early enough for libraries as they import the Arcade SDK not early enough. --> - <PropertyGroup Condition="'$(SkipImportArcadeSdkFromRoot)' == 'true'"> - <RepoRoot>$([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)'))</RepoRoot> - <RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir> - <ArtifactsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir> - <ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir> - <ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir> + <PropertyGroup Label="CalculateTargetOS"> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</TargetOS> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('ILLUMOS'))">illumos</TargetOS> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('SOLARIS'))">Solaris</TargetOS> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSUnixLike())">Linux</TargetOS> + <TargetOS Condition="'$(TargetOS)' == '' and $([MSBuild]::IsOSPlatform('WINDOWS'))">windows</TargetOS> + <TargetsMobile Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Browser'">true</TargetsMobile> </PropertyGroup> - <!-- Configuration properties which are needed in both the (isolated) restore and build phases. --> - <Import Project="$(RepositoryEngineeringDir)Configurations.props" /> + <!-- Platform property is required by RepoLayout.props in Arcade SDK. --> + <PropertyGroup Label="CalculateArch"> + <_hostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</_hostArch> + <BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$(_hostArch)</BuildArchitecture> + <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm'">arm</TargetArchitecture> + <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(_hostArch)' == 'arm64'">arm64</TargetArchitecture> + <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetOS)' == 'Browser'">wasm</TargetArchitecture> + <TargetArchitecture Condition="'$(TargetArchitecture)' == '' and '$(TargetsMobile)' == 'true'">x64</TargetArchitecture> + <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture> + <Platform Condition="'$(Platform)' == '' and '$(InferPlatformFromTargetArchitecture)' == 'true'">$(TargetArchitecture)</Platform> + </PropertyGroup> - <!-- - Get '<subset>Project' items. Using the items lets projects handle - $(Subset) automatically when creating project-to-project dependencies. - --> - <Import Project="$(RepositoryEngineeringDir)Subsets.props" /> + <!-- Import the Arcade SDK --> + <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> + <!-- The TFMs to build and test against. --> <PropertyGroup> - <!-- Installer specific, required during restore. --> - <InstallerTasksOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'installer.tasks'))</InstallerTasksOutputPath> - <InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'netstandard2.0', 'installer.tasks.dll'))</InstallerTasksAssemblyPath> - <InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'net461', 'installer.tasks.dll'))</InstallerTasksAssemblyPath> - - <DocsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'docs'))</DocsDir> - <ManPagesDir>$([MSBuild]::NormalizeDirectory('$(DocsDir)', 'manpages'))</ManPagesDir> - - <!-- System.Private.CoreLib --> - <CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir> - <CoreLibProject Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject> - <CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'netcore', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject> + <NetCoreAppCurrentVersion>$(MajorVersion).$(MinorVersion)</NetCoreAppCurrentVersion> + <AspNetCoreAppCurrentVersion>5.0</AspNetCoreAppCurrentVersion> + <NetCoreAppToolCurrentVersion>5.0</NetCoreAppToolCurrentVersion> + <NetCoreAppCurrentIdentifier>.NETCoreApp</NetCoreAppCurrentIdentifier> + <NetCoreAppCurrentTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppCurrentVersion)</NetCoreAppCurrentTargetFrameworkMoniker> + <NetCoreAppCurrent>net$(NetCoreAppCurrentVersion)</NetCoreAppCurrent> + <AspNetCoreAppCurrent>net$(AspNetCoreAppCurrentVersion)</AspNetCoreAppCurrent> + <NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent> + <NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker> + <!-- Used by Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk. --> + <NETCoreAppFramework>$(NetCoreAppCurrent)</NETCoreAppFramework> + <SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName> + <NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName> </PropertyGroup> <PropertyGroup> + <LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'libraries'))</LibrariesProjectRoot> + <CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'coreclr'))</CoreClrProjectRoot> + <MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'mono'))</MonoProjectRoot> + <InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'installer'))</InstallerProjectRoot> + <RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'tools-local'))</RepoToolsLocalDir> + <RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tasks'))</RepoTasksDir> + <IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir> + <XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir> + <XmlDocFileRoot>$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.private.intellisense', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles', 'net'))</XmlDocFileRoot> + <DocsDir>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'docs'))</DocsDir> + <ManPagesDir>$([MSBuild]::NormalizeDirectory('$(DocsDir)', 'manpages'))</ManPagesDir> + <AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)'))</AppleAppBuilderDir> <AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</AndroidAppBuilderDir> <WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmAppBuilderDir> <WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppToolCurrent)', 'publish'))</WasmBuildTasksDir> <MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppToolCurrent)'))</MonoAOTCompilerDir> + <InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', 'Debug', 'netstandard2.0', 'installer.tasks.dll'))</InstallerTasksAssemblyPath> + <InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'installer.tasks', 'Debug', 'net461', 'installer.tasks.dll'))</InstallerTasksAssemblyPath> <AppleAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))</AppleAppBuilderTasksAssemblyPath> <AndroidAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll'))</AndroidAppBuilderTasksAssemblyPath> <WasmAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll'))</WasmAppBuilderTasksAssemblyPath> @@ -65,39 +76,155 @@ <MonoAOTCompilerTasksAssemblyPath>$([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll'))</MonoAOTCompilerTasksAssemblyPath> </PropertyGroup> - <!-- Packaging properties --> + <PropertyGroup Label="CalculateConfiguration"> + <!-- The RuntimeConfiguration property allows to pass in/specify a configuration that applies to both CoreCLR and Mono. --> + <RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == ''">$(Configuration)</RuntimeConfiguration> + <RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == '' and ('$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release')">$(Configuration)</RuntimeConfiguration> + <RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == ''">Debug</RuntimeConfiguration> + <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(RuntimeConfiguration)</CoreCLRConfiguration> + <MonoConfiguration Condition="'$(MonoConfiguration)' == '' and '$(RuntimeConfiguration.ToLower())' != 'checked'">$(RuntimeConfiguration)</MonoConfiguration> + <!-- There's no checked configuration on Mono. --> + <MonoConfiguration Condition="'$(MonoConfiguration)' == '' and '$(RuntimeConfiguration.ToLower())' == 'checked'">Debug</MonoConfiguration> + <LibrariesConfiguration Condition="'$(LibrariesConfiguration)' == ''">$(Configuration)</LibrariesConfiguration> + </PropertyGroup> + + <PropertyGroup Label="CalculateOS"> + <!-- Default to portable build if not explicitly set --> + <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild> + + <_parseDistroRid>$(__DistroRid)</_parseDistroRid> + <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(MSBuildRuntimeType)' == 'core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</_parseDistroRid> + <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(MSBuildRuntimeType)' != 'core'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant)</_parseDistroRid> + <_distroRidIndex>$(_parseDistroRid.LastIndexOfAny("-"))</_distroRidIndex> + + <_runtimeOS>$(RuntimeOS)</_runtimeOS> + <_runtimeOS Condition="'$(_runtimeOS)' == ''">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</_runtimeOS> + + <!-- _runtimeOS is calculated based on the build system OS, however if building for Browser/iOS/Android we need to let + the build system to use browser/ios/android as the _runtimeOS for produced package RIDs. --> + <_runtimeOS Condition="'$(TargetsMobile)' == 'true'">$(TargetOS.ToLowerInvariant())</_runtimeOS> + + <_runtimeOSVersionIndex>$(_runtimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex> + <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(_runtimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily> + + <_portableOS>linux</_portableOS> + <_portableOS Condition="'$(_runtimeOS)' == 'linux-musl'">linux-musl</_portableOS> + <_portableOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx</_portableOS> + <_portableOS Condition="'$(_runtimeOSFamily)' == 'win' or '$(_runtimeOS)' == 'win' or '$(TargetOS)' == 'windows'">win</_portableOS> + <_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS> + <_portableOS Condition="'$(_runtimeOSFamily)' == 'illumos'">illumos</_portableOS> + <_portableOS Condition="'$(_runtimeOSFamily)' == 'Solaris'">solaris</_portableOS> + <_portableOS Condition="'$(_runtimeOS)' == 'Browser'">browser</_portableOS> + <_portableOS Condition="'$(_runtimeOS)' == 'ios'">ios</_portableOS> + <_portableOS Condition="'$(_runtimeOS)' == 'tvos'">tvos</_portableOS> + <_portableOS Condition="'$(_runtimeOS)' == 'android'">android</_portableOS> + + <_runtimeOS Condition="$(_runtimeOS.StartsWith('tizen'))">linux</_runtimeOS> + <_runtimeOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)</_runtimeOS> + + <!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for --> + <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl' and '$(_runtimeOSFamily)' != 'illumos' and '$(_runtimeOSFamily)' != 'Solaris'">linux</_portableOS> + </PropertyGroup> + + <PropertyGroup Label="CalculateRID"> + <_toolRuntimeRID Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_runtimeOS)-x64</_toolRuntimeRID> + <_toolRuntimeRID Condition="'$(_toolRuntimeRID)' == ''">$(_runtimeOS)-$(_hostArch)</_toolRuntimeRID> + <!-- We build linux-musl-arm on a ubuntu container, so we can't use the toolset build for alpine runtime. We need to use portable linux RID for our toolset in order to be able to use it. --> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'linux-musl' and $(TargetArchitecture.StartsWith('arm')) and !$(_hostArch.StartsWith('arm'))">linux-x64</_toolRuntimeRID> + + <!-- There are no WebAssembly tools, so use the default ones --> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser'">linux-x64</_toolRuntimeRID> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'browser' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID> + + <!-- There are no Android tools, so use the default ones --> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android'">linux-x64</_toolRuntimeRID> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('WINDOWS'))">win-x64</_toolRuntimeRID> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'android' and $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</_toolRuntimeRID> + + <!-- There are no iOS or tvOS tools and it can be built on OSX only, so use that --> + <_toolRuntimeRID Condition="'$(_runtimeOS)' == 'ios' or '$(_runtimeOS)' == 'tvos'">osx-x64</_toolRuntimeRID> + + <MicrosoftNetCoreIlasmPackageRuntimeId>$(_toolRuntimeRID)</MicrosoftNetCoreIlasmPackageRuntimeId> + + <_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(TargetArchitecture)</_packageRID> + <PackageRID Condition="'$(PackageRID)' == ''">$(_packageRID)</PackageRID> + <PackageRID Condition="'$(PackageRID)' == ''">$(_runtimeOS)-$(TargetArchitecture)</PackageRID> + + <_outputRID Condition="'$(TargetOS)' == 'windows'">win-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'OSX'">osx-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'Linux'">linux-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'NetBSD'">netbsd-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'illumos'">illumos-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'Solaris'">solaris-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'iOS'">ios-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'tvOS'">tvos-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'Android'">android-$(TargetArchitecture)</_outputRID> + <_outputRID Condition="'$(TargetOS)' == 'Browser'">browser-$(TargetArchitecture)</_outputRID> + + <OutputRid Condition="'$(OutputRid)' == ''">$(PackageRID)</OutputRid> + <OutputRid Condition="'$(PortableBuild)' == 'true'">$(_outputRID)</OutputRid> + </PropertyGroup> + + <PropertyGroup Label="CalculateTargetOSName" Condition="'$(SkipInferTargetOSName)' != 'true'"> + <TargetsFreeBSD Condition="'$(TargetOS)' == 'FreeBSD'">true</TargetsFreeBSD> + <Targetsillumos Condition="'$(TargetOS)' == 'illumos'">true</Targetsillumos> + <TargetsSolaris Condition="'$(TargetOS)' == 'Solaris'">true</TargetsSolaris> + <TargetsLinux Condition="'$(TargetOS)' == 'Linux' or '$(TargetOS)' == 'Android'">true</TargetsLinux> + <TargetsNetBSD Condition="'$(TargetOS)' == 'NetBSD'">true</TargetsNetBSD> + <TargetsOSX Condition="'$(TargetOS)' == 'OSX'">true</TargetsOSX> + <TargetsiOS Condition="'$(TargetOS)' == 'iOS'">true</TargetsiOS> + <TargetstvOS Condition="'$(TargetOS)' == 'tvOS'">true</TargetstvOS> + <TargetsiOSSimulator Condition="'$(TargetsiOS)' == 'true' and ('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'x86')">true</TargetsiOSSimulator> + <TargetstvOSSimulator Condition="'$(TargetstvOS)' == 'true' and '$(TargetArchitecture)' == 'x64'">true</TargetstvOSSimulator> + <TargetsAndroid Condition="'$(TargetOS)' == 'Android'">true</TargetsAndroid> + <TargetsBrowser Condition="'$(TargetOS)' == 'Browser'">true</TargetsBrowser> + <TargetsWindows Condition="'$(TargetOS)' == 'windows'">true</TargetsWindows> + <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(Targetsillumos)' == 'true' or '$(TargetsSolaris)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true' or '$(TargetstvOS)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetsAndroid)' == 'true'">true</TargetsUnix> + </PropertyGroup> + + <!--Feature switches --> + <PropertyGroup> + <EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(Configuration)' == 'Release'">true</EnableNgenOptimization> + <!-- Enable NuGet static graph evaluation to optimize incremental restore --> + <RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation> + <!-- Turn off end of life target framework checks as we intentionally build older .NETCoreApp configurations. --> + <CheckEolTargetFramework>false</CheckEolTargetFramework> + </PropertyGroup> + + <!-- RepositoryEngineeringDir isn't set when Installer tests import this file. --> + <Import Project="$(RepositoryEngineeringDir)native\naming.props" /> + <Import Project="$(RepositoryEngineeringDir)Subsets.props" /> + <Import Project="$(RepositoryEngineeringDir)Analyzers.props" /> + + <PropertyGroup> + <CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir> + <CoreLibProject Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject> + <CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'netcore', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject> + </PropertyGroup> + + <!-- Packaging --> <PropertyGroup> - <!-- - This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used - to find source code for debugging. It is also used to name the build output manifest for orchestrated builds. - --> <GitHubRepositoryName>runtime</GitHubRepositoryName> <RepositoryUrl>git://github.com/dotnet/runtime</RepositoryUrl> <ProjectUrl>https://github.com/dotnet/runtime</ProjectUrl> <LicenseUrl>https://github.com/dotnet/runtime/blob/master/LICENSE.TXT</LicenseUrl> <RuntimeIdGraphDefinitionFile>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'pkg', 'Microsoft.NETCore.Platforms', 'runtime.json'))</RuntimeIdGraphDefinitionFile> - <LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile> + <LicenseFile>$(MSBuildThisFileDirectory)LICENSE.TXT</LicenseFile> <PackageLicenseExpression>MIT</PackageLicenseExpression> <Copyright>$(CopyrightNetFoundation)</Copyright> - <PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile> + <PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile> <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes> - <!-- Indicates this is not an officially supported release. Release branches should set this to false. --> <!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake --> <IsPrerelease>true</IsPrerelease> - <IsExperimentalAssembly>$(MSBuildProjectName.Contains('Experimental'))</IsExperimentalAssembly> - <!-- Experimental packages should not be stable --> <SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsExperimentalAssembly)">true</SuppressFinalPackageVersion> <IsShippingAssembly Condition="$(IsExperimentalAssembly)">false</IsShippingAssembly> - <!-- We don't want Private packages to be shipped to NuGet.org --> <IsShippingPackage Condition="($(MSBuildProjectName.Contains('Private')) or $(IsExperimentalAssembly)) and '$(MSBuildProjectExtension)' == '.pkgproj'">false</IsShippingPackage> - - <!-- By default the SDK produces ref assembly for 5.0 or later --> - <ProduceReferenceAssembly>false</ProduceReferenceAssembly> - <!-- Set IsPackable true for all pkgproj as Arcade unconditionally overrides the value. --> <IsPackable Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">true</IsPackable> </PropertyGroup> @@ -107,19 +234,18 @@ <!-- default to allowing all language features --> <LangVersion>preview</LangVersion> <LangVersion Condition="'$(MSBuildProjectExtension)' == '.vbproj'">latest</LangVersion> + <!-- Enables Strict mode for Roslyn compiler --> + <Features>strict;nullablePublicOnly</Features> <Deterministic>true</Deterministic> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - </PropertyGroup> - - <PropertyGroup> + <!-- Always pass portable to override arcade sdk which uses embedded for local builds --> + <DebugType>portable</DebugType> + <DebugSymbols>true</DebugSymbols> <!-- Default to discarding symbols if not explicitly set --> <KeepNativeSymbols Condition="'$(KeepNativeSymbols)' == ''">false</KeepNativeSymbols> <!-- Used for launchSettings.json and runtime config files. --> <AppDesignerFolder>Properties</AppDesignerFolder> - <!-- Determine what architecture we are building on. --> - <BuildArchitecture Condition="'$(BuildArchitecture)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture> + <!-- By default the SDK produces ref assembly for 5.0 or later --> + <ProduceReferenceAssembly>false</ProduceReferenceAssembly> </PropertyGroup> - - <Import Project="$(RepositoryEngineeringDir)Analyzers.props" /> - </Project> |