Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Hofer <viktor.hofer@microsoft.com>2019-10-29 14:44:25 +0300
committerGitHub <noreply@github.com>2019-10-29 14:44:25 +0300
commit61b525770e280602f74a8e20047fb5653be35881 (patch)
tree86060b18c74ab84a416df5178831fe6382c9a4b7
parent269553bd8af1e98d792d34c870f61b9e6f1a9cf8 (diff)
Prepare corefx for repo consolidation (dotnet/corefx#42175)
* Prepare corefx for repo consolidation into runtime Commit migrated from https://github.com/dotnet/corefx/commit/e160dd972d958fbe9594dc1001da4d1b94bba949
-rw-r--r--eng/analyzers.props (renamed from eng/Analyzers.props)0
-rw-r--r--eng/codeAnalysis.targets (renamed from eng/CodeAnalysis.targets)0
-rw-r--r--eng/packaging.props (renamed from eng/Packaging.props)13
-rw-r--r--eng/packaging.targets (renamed from eng/Packaging.targets)0
-rw-r--r--eng/pipelines/libraries/corefx-base.yml2
-rw-r--r--eng/pipelines/libraries/helix.yml2
-rw-r--r--eng/pipelines/libraries/pre-publish.yml2
-rw-r--r--eng/referenceAssemblies.props (renamed from eng/ReferenceAssemblies.props)0
-rw-r--r--eng/resolveContract.targets2
-rw-r--r--eng/resources.targets (renamed from eng/Resources.targets)0
-rw-r--r--eng/restore/repoRestore.targets2
-rw-r--r--eng/versioning.targets2
-rw-r--r--src/libraries/.gitmirrorall1
-rw-r--r--src/libraries/Directory.Build.props370
-rw-r--r--src/libraries/Directory.Build.targets151
-rw-r--r--src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj2
-rw-r--r--src/libraries/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj14
-rw-r--r--src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj2
-rw-r--r--src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj2
-rw-r--r--src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj4
-rw-r--r--src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj4
-rw-r--r--src/libraries/build.proj24
-rw-r--r--src/libraries/dir.traversal.targets (renamed from eng/dir.traversal.targets)2
-rw-r--r--src/libraries/dirs.proj4
-rw-r--r--src/libraries/packages.builds10
-rw-r--r--src/libraries/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj4
-rw-r--r--src/libraries/pkg/dir.traversal.targets2
-rw-r--r--src/libraries/pkg/test/testPackages.proj2
-rw-r--r--src/libraries/pretest.proj2
-rw-r--r--src/libraries/publishTestAssets.proj (renamed from eng/publishTestAssets.proj)4
-rw-r--r--src/libraries/ref.builds4
-rw-r--r--src/libraries/restore/Directory.Build.props (renamed from eng/restore/Directory.Build.props)2
-rw-r--r--src/libraries/restore/Directory.Build.targets (renamed from eng/restore/Directory.Build.targets)2
-rw-r--r--src/libraries/restore/analyzers/Configurations.props (renamed from eng/restore/analyzers/Configurations.props)0
-rw-r--r--src/libraries/restore/analyzers/analyzers.depproj (renamed from eng/restore/analyzers/analyzers.depproj)2
-rw-r--r--src/libraries/restore/binplacePackages/Configurations.props (renamed from eng/restore/binplacePackages/Configurations.props)0
-rw-r--r--src/libraries/restore/binplacePackages/binplacePackages.depproj (renamed from eng/restore/binplacePackages/binplacePackages.depproj)0
-rw-r--r--src/libraries/restore/dirs.proj (renamed from eng/restore/dirs.proj)2
-rw-r--r--src/libraries/restore/harvestPackages/Configurations.props (renamed from eng/restore/harvestPackages/Configurations.props)0
-rw-r--r--src/libraries/restore/harvestPackages/harvestPackages.depproj (renamed from eng/restore/harvestPackages/harvestPackages.depproj)4
-rw-r--r--src/libraries/restore/netcoreapp/Configurations.props (renamed from eng/restore/netcoreapp/Configurations.props)0
-rw-r--r--src/libraries/restore/netcoreapp/netcoreapp.depproj (renamed from eng/restore/netcoreapp/netcoreapp.depproj)0
-rw-r--r--src/libraries/restore/netfx/Configurations.props (renamed from eng/restore/netfx/Configurations.props)0
-rw-r--r--src/libraries/restore/netfx/netfx.depproj (renamed from eng/restore/netfx/netfx.depproj)2
-rw-r--r--src/libraries/restore/netstandard/Configurations.props (renamed from eng/restore/netstandard/Configurations.props)0
-rw-r--r--src/libraries/restore/netstandard/netstandard.depproj (renamed from eng/restore/netstandard/netstandard.depproj)0
-rw-r--r--src/libraries/restore/runtime/Configurations.props (renamed from eng/restore/runtime/Configurations.props)0
-rw-r--r--src/libraries/restore/runtime/Directory.Build.props (renamed from eng/restore/runtime/Directory.Build.props)0
-rw-r--r--src/libraries/restore/runtime/runtime.depproj (renamed from eng/restore/runtime/runtime.depproj)0
-rw-r--r--src/libraries/restore/tools/Configurations.props (renamed from eng/restore/tools/Configurations.props)0
-rw-r--r--src/libraries/restore/tools/tools.depproj (renamed from eng/restore/tools/tools.depproj)0
-rw-r--r--src/libraries/restore/winrt/Configurations.props (renamed from eng/restore/winrt/Configurations.props)0
-rw-r--r--src/libraries/restore/winrt/winrt.depproj (renamed from eng/restore/winrt/winrt.depproj)0
-rw-r--r--src/libraries/sendtohelix.proj (renamed from eng/sendtohelix.proj)4
-rw-r--r--src/libraries/src.builds4
-rw-r--r--src/libraries/tests.proj2
56 files changed, 579 insertions, 78 deletions
diff --git a/eng/Analyzers.props b/eng/analyzers.props
index f49d7a9aaa4..f49d7a9aaa4 100644
--- a/eng/Analyzers.props
+++ b/eng/analyzers.props
diff --git a/eng/CodeAnalysis.targets b/eng/codeAnalysis.targets
index 74f6163d458..74f6163d458 100644
--- a/eng/CodeAnalysis.targets
+++ b/eng/codeAnalysis.targets
diff --git a/eng/Packaging.props b/eng/packaging.props
index 25987e9894d..422b8808e01 100644
--- a/eng/Packaging.props
+++ b/eng/packaging.props
@@ -1,16 +1,15 @@
<Project>
<PropertyGroup>
- <PackageDescriptionFile>$(RepoRoot)pkg/descriptions.json</PackageDescriptionFile>
+ <PackageDescriptionFile>$(PkgDir)descriptions.json</PackageDescriptionFile>
<PackageLicenseFile>$(RepoRoot)LICENSE.TXT</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
- <RuntimeIdGraphDefinitionFile>$(RepoRoot)pkg/Microsoft.NETCore.Platforms/runtime.json</RuntimeIdGraphDefinitionFile>
+ <RuntimeIdGraphDefinitionFile>$(PkgDir)Microsoft.NETCore.Platforms/runtime.json</RuntimeIdGraphDefinitionFile>
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
- <ProjectUrl>https://github.com/dotnet/corefx</ProjectUrl>
- <LicenseUrl>https://github.com/dotnet/corefx/blob/master/LICENSE.TXT</LicenseUrl>
+ <ProjectUrl Condition="'$(ProjectUrl)' == ''">https://github.com/dotnet/corefx</ProjectUrl>
+ <LicenseUrl Condition="'$(LicenseUrl)' == ''">https://github.com/dotnet/corefx/blob/master/LICENSE.TXT</LicenseUrl>
<!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
<PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
<PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
- <NativePackagePath>$(MSBuildThisFileDirectory)src/Native/pkg</NativePackagePath>
<!-- Used by PackageLibs.targets -->
<XmlDocFileRoot>$(NuGetPackageRoot)$(MicrosoftPrivateIntellisensePackageId)/$(MicrosoftPrivateIntellisensePackageVersion)/xmldocs/netcoreapp</XmlDocFileRoot>
@@ -45,7 +44,7 @@
<PackageConfigurations>$(BuildConfigurations)</PackageConfigurations>
</PropertyGroup>
- <Import Condition="Exists('../pkg/baseline/baseline.props') AND '$(MSBuildProjectExtension)' == '.pkgproj'" Project="../pkg/baseline/baseline.props" />
+ <Import Condition="Exists('$(PkgDir)baseline\baseline.props') AND '$(MSBuildProjectExtension)' == '.pkgproj'" Project="$(PkgDir)baseline\baseline.props" />
<PropertyGroup Condition="'$(OsEnvironment)'=='Unix'">
<!--
@@ -75,7 +74,7 @@
<!-- Add a marker to help the designer optimize & share .NET Core packages -->
<File Condition="'$(IncludeDesignerMarker)' != 'false'"
- Include="$(RepoRoot)pkg/useSharedDesignerContext.txt">
+ Include="$(PkgDir)useSharedDesignerContext.txt">
<SkipPackageFileCheck>true</SkipPackageFileCheck>
</File>
</ItemGroup>
diff --git a/eng/Packaging.targets b/eng/packaging.targets
index 6bc626451ca..6bc626451ca 100644
--- a/eng/Packaging.targets
+++ b/eng/packaging.targets
diff --git a/eng/pipelines/libraries/corefx-base.yml b/eng/pipelines/libraries/corefx-base.yml
index 65364ae4ac7..3080cb58d55 100644
--- a/eng/pipelines/libraries/corefx-base.yml
+++ b/eng/pipelines/libraries/corefx-base.yml
@@ -159,7 +159,7 @@ jobs:
- ${{ if eq(job.submitToHelix, 'true') }}:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- - script: $(_msbuildCommand) eng/publishTestAssets.proj
+ - script: $(_msbuildCommand) src/publishTestAssets.proj
/p:FilesToPublishPattern=$(Build.SourcesDirectory)/artifacts/helix/**/*.zip
/p:AccountKey=$(dotnetfeed-storage-access-key-1)
/p:ExpectedFeedUrl=$(_dotnetFeedUrl)
diff --git a/eng/pipelines/libraries/helix.yml b/eng/pipelines/libraries/helix.yml
index 9ca0c08dac6..419df576489 100644
--- a/eng/pipelines/libraries/helix.yml
+++ b/eng/pipelines/libraries/helix.yml
@@ -13,7 +13,7 @@ parameters:
steps:
- script: ${{ parameters.msbuildScript }}
- eng/sendtohelix.proj
+ src/sendtohelix.proj
/t:test
/p:ArchGroup=${{ parameters.archGroup }}
/p:ConfigurationGroup=${{ parameters.configuration }}
diff --git a/eng/pipelines/libraries/pre-publish.yml b/eng/pipelines/libraries/pre-publish.yml
index d2140910a66..9d0460bd01e 100644
--- a/eng/pipelines/libraries/pre-publish.yml
+++ b/eng/pipelines/libraries/pre-publish.yml
@@ -77,7 +77,7 @@ stages:
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/PublishToArtifacts.binlog
displayName: Publish to artifacts and produce manifest
- - script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 build.proj
+ - script: powershell -ExecutionPolicy ByPass -NoProfile eng\common\msbuild.ps1 src\build.proj
-warnaserror:0 -ci
/t:UpdatePublishedVersions
/p:GitHubAuthToken=$(AccessToken-dotnet-build-bot-public-repo)
diff --git a/eng/ReferenceAssemblies.props b/eng/referenceAssemblies.props
index ba1e667fb4e..ba1e667fb4e 100644
--- a/eng/ReferenceAssemblies.props
+++ b/eng/referenceAssemblies.props
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets
index c4a95eae082..9598aec36c4 100644
--- a/eng/resolveContract.targets
+++ b/eng/resolveContract.targets
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
- <ContractProject Condition="'$(ContractProject)' == ''">$(SourceDir)/$(MSBuildProjectName)/ref/$(MSBuildProjectName).csproj</ContractProject>
+ <ContractProject Condition="'$(ContractProject)' == ''">$(LibrariesProjectRoot)$(MSBuildProjectName)/ref/$(MSBuildProjectName).csproj</ContractProject>
<HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract>
<ContractAssemblyPath Condition="'$(ContractAssemblyPath)' == ''">$(RefPath)/$(MSBuildProjectName).dll</ContractAssemblyPath>
diff --git a/eng/Resources.targets b/eng/resources.targets
index 5df76a12cd6..5df76a12cd6 100644
--- a/eng/Resources.targets
+++ b/eng/resources.targets
diff --git a/eng/restore/repoRestore.targets b/eng/restore/repoRestore.targets
index f3917de40be..f76976ba1f2 100644
--- a/eng/restore/repoRestore.targets
+++ b/eng/restore/repoRestore.targets
@@ -4,7 +4,7 @@
<RestoreProjectStyle Condition="'$(MSBuildProjectExtension)' != '.depproj'">None</RestoreProjectStyle>
</PropertyGroup>
- <Import Project="$(RepositoryEngineeringDir)CodeAnalysis.targets" />
+ <Import Project="$(RepositoryEngineeringDir)codeAnalysis.targets" />
<PropertyGroup>
<!-- Nuget will normally disable all generated imports as part of a restore to avoid
diff --git a/eng/versioning.targets b/eng/versioning.targets
index ec0ceab21c0..cfad657c09d 100644
--- a/eng/versioning.targets
+++ b/eng/versioning.targets
@@ -10,7 +10,7 @@
<!-- Assembly metadata indicating that an assembly is a framework (as opposed to user) assembly:
Test projects need to not have this because of the way "IsFrameworkAssembly" APIs work to check this. -->
- <ItemGroup Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' AND '$(IsTestProject)' != 'true'" >
+ <ItemGroup Condition="'$(IsTestProject)' != 'true'" >
<AssemblyMetadata Include=".NETFrameworkAssembly">
<Value></Value>
</AssemblyMetadata>
diff --git a/src/libraries/.gitmirrorall b/src/libraries/.gitmirrorall
deleted file mode 100644
index 9ee5c57b991..00000000000
--- a/src/libraries/.gitmirrorall
+++ /dev/null
@@ -1 +0,0 @@
-This folder will be mirrored by the Git-TFS Mirror recursively. \ No newline at end of file
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index feea0a5894f..3495bd2f845 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -1,5 +1,367 @@
<Project>
- <Import Project="..\Directory.Build.props" />
+ <!-- Base repo layout properties -->
+ <PropertyGroup>
+ <RepoRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), global.json))</RepoRoot>
+ <RepoRoot>$([MSBuild]::EnsureTrailingSlash('$(RepoRoot)'))</RepoRoot>
+ <RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir>
+ <LibrariesProjectRoot>$(MSBuildThisFileDirectory)</LibrariesProjectRoot>
+ <RepositoryUrl>git://github.com/dotnet/corefx</RepositoryUrl>
+ </PropertyGroup>
+
+ <!-- TODO: Consolidate when moved to runtime repository: dotnet/corefx#42170 -->
+ <PropertyGroup>
+ <IsRuntimeRepository Condition="Exists('..\..\.dotnet-runtime-placeholder')">true</IsRuntimeRepository>
+ </PropertyGroup>
+ <Import Project="..\..\Directory.Build.props" Condition="'$(IsRuntimeRepository)' == 'true'" />
+
+ <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
+ -->
+ <ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
+
+ <!-- We use the compiler toolset that comes from NuGet Packages rather than the SDK built-in.
+ This one sets UseSharedCompilation to false by default. -->
+ <UseSharedCompilation>true</UseSharedCompilation>
+
+ <ToolSetCommonDirectory>$(RepoRoot)artifacts\toolset\Common\</ToolSetCommonDirectory>
+ <IsSourceProject>$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))</IsSourceProject>
+ </PropertyGroup>
+
+ <!-- Import configuration data model -->
+ <Import Project="$(RepositoryEngineeringDir)configurations/properties.props" />
+
+ <PropertyGroup Condition="'$(BuildingInsideVisualStudio)' == 'true' and '$(Configuration)' != ''">
+ <!-- When building in VS setup the ConfigurationGroup based on the given Configuration -->
+ <ConfigurationGroup Condition="$(Configuration.EndsWith('Debug'))">Debug</ConfigurationGroup>
+ <ConfigurationGroup Condition="$(Configuration.EndsWith('Release'))">Release</ConfigurationGroup>
+ </PropertyGroup>
+
+ <!-- Platform detection -->
+ <PropertyGroup>
+ <!--
+ Use MSBuild property functions for platform detection:
+ https://docs.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2019#msbuild-property-functions
+ Note that some of these intrinsic functions are implemented using RuntimeInformation:
+ https://github.com/Microsoft/msbuild/blob/3a9d1d2ae23e41b32a612ea6b0dce531fcf86be7/src/Build/Evaluation/IntrinsicFunctions.cs#L431
+ -->
+ <DefaultOSGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">OSX</DefaultOSGroup>
+ <DefaultOSGroup Condition="'$(DefaultOSGroup)'=='' AND $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</DefaultOSGroup>
+ <DefaultOSGroup Condition="'$(DefaultOSGroup)'=='' AND $([MSBuild]::IsOSPlatform('NETBSD'))">NetBSD</DefaultOSGroup>
+ <DefaultOSGroup Condition="'$(DefaultOSGroup)'=='' AND $([MSBuild]::IsOSUnixLike())">Linux</DefaultOSGroup>
+ <DefaultOSGroup Condition="'$(DefaultOSGroup)'==''">$(OS)</DefaultOSGroup>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!--
+ These *Group properties are only intended to enable passing them individually at the command line to initialize
+ BuildConfiguration. They will be overwritten by our configurations/configuration.props file and defaulted
+ based on Configuration for the individual projects which is selected based on BuildConfiguration.
+
+ See Documentation/coding-guidelines/project-guidelines.md for more details on our configurations.
+ -->
+ <TargetGroup Condition="'$(TargetGroup)' == ''">netcoreapp</TargetGroup>
+ <OSGroup Condition="'$(OSGroup)' == ''">$(DefaultOSGroup)</OSGroup>
+ <ConfigurationGroup Condition="'$(ConfigurationGroup)' == ''">Debug</ConfigurationGroup>
+ <HostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</HostArch>
+ <ArchGroup Condition="'$(ArchGroup)' == '' and '$(HostArch)' == 'arm'">arm</ArchGroup>
+ <ArchGroup Condition="'$(ArchGroup)' == '' and '$(HostArch)' == 'arm64'">arm64</ArchGroup>
+ <ArchGroup Condition="'$(ArchGroup)' == '' and '$(OSGroup)' == 'WebAssembly'">wasm</ArchGroup>
+ <ArchGroup Condition="'$(ArchGroup)' == ''">x64</ArchGroup>
+
+ <!-- RuntimeOS is calculated based on the build system OS, however if building for WebAssembly we need to let
+ the build system to use webassembly as the RuntimeOS for produced package RIDs. -->
+ <RuntimeOS Condition="'$(OSGroup)' == 'WebAssembly'">$(OSGroup.ToLowerInvariant())</RuntimeOS>
+
+ <!-- Initialize BuildConfiguration from the individual properties if it wasn't already explicitly set -->
+ <BuildConfiguration Condition="'$(BuildConfiguration)' == ''">$(TargetGroup)-$(OSGroup)-$(ConfigurationGroup)-$(ArchGroup)</BuildConfiguration>
+
+ <!-- if PKGPROJ doesn't set BuildConfigurations, make sure it only builds for TargetGroup=package or BuildAllConfigurations -->
+ <BuildConfigurations Condition="'$(MSBuildProjectExtension)' == '.pkgproj' and '$(BuildConfigurations)' == ''">package</BuildConfigurations>
+ </PropertyGroup>
+
+ <!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
+ <PropertyGroup>
+ <IsPrerelease>true</IsPrerelease>
+ </PropertyGroup>
+
+ <Import Sdk="Microsoft.DotNet.Build.Tasks.Configuration" Project="Sdk.props" />
+ <Import Sdk="Microsoft.DotNet.CoreFxTesting" Project="Sdk.props" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(BuildAllConfigurations)' != 'true'" />
+
+ <PropertyGroup>
+ <EnableProjectRestore Condition="'$(IsTestProject)' == 'true'">true</EnableProjectRestore>
+ </PropertyGroup>
+
+ <Import Condition="'$(EnableProjectRestore)' != 'true'" Project="$(RepositoryEngineeringDir)restore\repoRestore.props" />
+
+ <!-- Common repo directories -->
+ <PropertyGroup>
+ <ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin'))</ArtifactsBinDir>
+
+ <!-- Need to try and keep the same logic as the native builds as we need this for packaging -->
+ <NativeBinDir>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'native', '$(BuildConfiguration)'))</NativeBinDir>
+
+ <PkgDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'pkg'))</PkgDir>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- By default make all libraries to be AnyCPU but individual projects can override it if they need to -->
+ <Platform>AnyCPU</Platform>
+ <OutputType>Library</OutputType>
+ <!-- Default any assembly not specifying a key to use the Open Key -->
+ <StrongNameKeyId>Open</StrongNameKeyId>
+ <RunApiCompatForSrc>$(IsSourceProject)</RunApiCompatForSrc>
+ <RunMatchingRefApiCompat>$(IsSourceProject)</RunMatchingRefApiCompat>
+ <ApiCompatExcludeAttributeList>$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt</ApiCompatExcludeAttributeList>
+ <!-- Build as portable by default -->
+ <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
+ <!-- Used for launchSettings.json and runtime config files. -->
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <_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="'$(_runtimeOSFamily)' == 'win' OR '$(OSGroup)' == 'Windows_NT'">win</_portableOS>
+ <_portableOS Condition="'$(_runtimeOSFamily)' == 'osx'">osx</_portableOS>
+ <_portableOS Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">freebsd</_portableOS>
+ <_portableOS Condition="'$(RuntimeOS)' == 'WebAssembly'">webassembly</_portableOS>
+
+ <_runtimeOS>$(RuntimeOS)</_runtimeOS>
+ <_runtimeOS Condition="'$(_runtimeOS)' == 'tizen.4.0.0'">linux</_runtimeOS>
+ <_runtimeOS Condition="'$(_runtimeOS)' == 'tizen.5.0.0'">linux</_runtimeOS>
+ <_runtimeOS Condition="'$(PortableBuild)' == 'true'">$(_portableOS)</_runtimeOS>
+ <ToolRuntimeRID Condition="'$(BuildingInsideVisualStudio)' == 'true'">$(_runtimeOS)-x64</ToolRuntimeRID>
+ <ToolRuntimeRID Condition="'$(ToolRuntimeID)' == ''">$(_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 $(ArchGroup.StartsWith('arm')) AND !$(HostArch.StartsWith('arm'))">linux-x64</ToolRuntimeRID>
+
+ <!-- There are no WebAssembly tools, so use the default ones -->
+ <_buildingInOSX>$([MSBuild]::IsOSPlatform('OSX'))</_buildingInOSX>
+ <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OS)' == 'Windows_NT'">win-x64</ToolRuntimeRID>
+ <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OS)' != 'Windows_NT' and $(_buildingInOSX)">osx-x64</ToolRuntimeRID>
+ <ToolRuntimeRID Condition="'$(RuntimeOS)' == 'webassembly' and '$(OS)' != 'Windows_NT' and !$(_buildingInOSX)">linux-x64</ToolRuntimeRID>
+
+ <!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
+ <_portableOS Condition="'$(OSGroup)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' AND '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS>
+
+ <!-- support cross-targeting by choosing a RID to restore when running on a different machine that what we're build for -->
+ <_portableOS Condition="'$(OSGroup)' == 'Unix' AND '$(_runtimeOSFamily)' != 'osx' AND '$(_runtimeOSFamily)' != 'FreeBSD' AND '$(_runtimeOS)' != 'linux-musl'">linux</_portableOS>
+
+ <_packageRID />
+ <_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
+ <PackageRID Condition="'$(PackageRID)' == ''">$(_packageRID)</PackageRID>
+ <PackageRID Condition="'$(PackageRID)' == ''">$(RuntimeOS)-$(ArchGroup)</PackageRID>
+ </PropertyGroup>
+
+ <!-- Set some shortcuts for more terse conditions in project files -->
+ <PropertyGroup>
+ <TargetsNetCoreApp Condition="$(TargetFramework.StartsWith('netcoreapp'))">true</TargetsNetCoreApp>
+ <TargetsNetStandard Condition="$(TargetFramework.StartsWith('netstandard'))">true</TargetsNetStandard>
+ <TargetsNetFx Condition="$(TargetFramework.StartsWith('net4'))">true</TargetsNetFx>
+ </PropertyGroup>
+
+ <!-- set properties for each vertical -->
+ <PropertyGroup>
+ <BuildingNETCoreAppVertical Condition="'$(BuildingNETCoreAppVertical)' == '' AND ('$(_bc_TargetGroup)'=='netcoreapp' OR '$(BuildAllConfigurations)' == 'true')">true</BuildingNETCoreAppVertical>
+ <BuildingNETFxVertical Condition="'$(BuildingNETFxVertical)' == '' AND ('$(_bc_TargetGroup)'=='netfx' OR '$(BuildAllConfigurations)' == 'true')">true</BuildingNETFxVertical>
+ </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
+ -->
+ <PropertyGroup>
+ <DisableArcadeTestFramework>true</DisableArcadeTestFramework>
+ </PropertyGroup>
+
+ <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
+
+ <PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
+ <Copyright>$(CopyrightNetFoundation)</Copyright>
+ <!-- Temporarily disable PackageLicenseExpression until we can workaround
+ https://github.com/NuGet/Home/issues/7894 -->
+ <!-- PackageLicenseExpression>MIT</PackageLicenseExpression -->
+ </PropertyGroup>
+
+ <!-- Import packaging props -->
+ <Import Project="$(RepositoryEngineeringDir)packaging.props" />
+
+ <PropertyGroup>
+ <!-- Always pass portable to override arcade sdk which uses embedded for local builds -->
+ <DebugType>portable</DebugType>
+
+ <!-- Empty DebugType when building for netfx and in windows so that it is set to full or pdbonly later -->
+ <DebugType Condition="'$(TargetsNetFx)' == 'true' AND '$(OS)' == 'Windows_NT'" />
+
+ <!-- Workaround for codecov issue https://github.com/tonerdo/coverlet/issues/312 -->
+ <EnableSourceLink Condition="'$(ContinuousIntegrationBuild)' != 'true' and '$(OfficialBuildId)' == ''">false</EnableSourceLink>
+
+ <!-- TODO-NULLABLE: Remove once netstandard has annotations for Debug.Assert, string.IsNullOrEmpty, etc. -->
+ <NoWarn Condition="'$(TargetsNetFx)' == 'true' OR '$(TargetsNetStandard)' == 'true'">$(NoWarn);nullable</NoWarn>
+ </PropertyGroup>
+
+ <!-- Set up Default symbol and optimization for Configuration -->
+ <Choose>
+ <When Condition="'$(ConfigurationGroup)'=='Debug'">
+ <PropertyGroup>
+ <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
+ <Optimize Condition="'$(Optimize)' == ''">false</Optimize>
+ <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
+ <DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants>
+ </PropertyGroup>
+ </When>
+ <When Condition="'$(ConfigurationGroup)' == 'Release'">
+ <PropertyGroup>
+ <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
+ <Optimize Condition="'$(Optimize)' == ''">true</Optimize>
+ <DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
+ <DefineConstants>$(DefineConstants),TRACE</DefineConstants>
+ </PropertyGroup>
+ </When>
+ </Choose>
+
+ <!-- Disable some standard properties for building our projects -->
+ <PropertyGroup>
+ <NoStdLib>true</NoStdLib>
+ <NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+ <CopyNuGetImplementations>false</CopyNuGetImplementations>
+ <!-- Don't reference implicit framework packages, all projects in this repo must be explicit -->
+ <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
+ <!-- We can't generate an apphost without restoring the targeting pack. -->
+ <UseAppHost>false</UseAppHost>
+ </PropertyGroup>
+
+ <!-- Language configuration -->
+ <PropertyGroup>
+ <!-- default to allowing all language features -->
+ <LangVersion>latest</LangVersion>
+ <LangVersion Condition="'$(Language)' == 'C#'">preview</LangVersion>
+ <Features>strict;nullablePublicOnly</Features>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <Deterministic>true</Deterministic>
+
+ <!-- We decided to keep this disabled by default to see some history of way have a look at https://github.com/dotnet/corefx/issues/3140 -->
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+
+ <!-- Suppress preview message as we are usually using preview SDK versions. -->
+ <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
+ <GenFacadesIgnoreBuildAndRevisionMismatch>true</GenFacadesIgnoreBuildAndRevisionMismatch>
+
+ <!-- Resource naming bug: https://github.com/microsoft/msbuild/issues/4740 -->
+ <EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
+ </PropertyGroup>
+
+ <!-- Set up some common paths -->
+ <PropertyGroup>
+ <CommonPath>$(LibrariesProjectRoot)Common\src</CommonPath>
+ <CommonTestPath>$(LibrariesProjectRoot)Common\tests</CommonTestPath>
+ </PropertyGroup>
+
+ <!-- Set up the default output and intermediate paths -->
+ <PropertyGroup>
+ <!--
+ Microsoft.NET.TargetFrameworkInference.targets appends the TargetFramework.
+ We do this manually and use the TargetGroup instead.
+ -->
+ <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+
+ <RuntimePath Condition="'$(RuntimePath)' == ''">$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'runtime', '$(BuildConfiguration)'))</RuntimePath>
+ <RefRootPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'ref'))</RefRootPath>
+ <BuildConfigurationRefPath>$([MSBuild]::NormalizeDirectory('$(RefRootPath)', '$(_bc_TargetGroup)'))</BuildConfigurationRefPath>
+ <RefPath>$([MSBuild]::NormalizeDirectory('$(RefRootPath)', '$(TargetGroup)'))</RefPath>
+ <NetStandard20RefPath>$([MSBuild]::NormalizeDirectory('$(RefRootPath)', 'netstandard2.0'))</NetStandard20RefPath>
+ <NetStandard21RefPath>$([MSBuild]::NormalizeDirectory('$(RefRootPath)', 'netstandard2.1'))</NetStandard21RefPath>
+ <NetFxRefPath>$([MSBuild]::NormalizeDirectory('$(RefRootPath)', 'netfx'))</NetFxRefPath>
+ <ILAsmToolPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ilasm'))</ILAsmToolPath>
+
+ <!-- Helix properties -->
+ <OSPlatformConfig>$(OSGroup).$(Platform).$(ConfigurationGroup)</OSPlatformConfig>
+ <AnyOSPlatformConfig>AnyOS.AnyCPU.$(ConfigurationGroup)</AnyOSPlatformConfig>
+ <UnixPlatformConfig>Unix.$(Platform).$(ConfigurationGroup)</UnixPlatformConfig>
+ <TestArchiveRoot>$(ArtifactsDir)helix/</TestArchiveRoot>
+ <TestArchiveTestsRoot>$(TestArchiveRoot)tests/</TestArchiveTestsRoot>
+ <TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
+ <TestArchiveRuntimeRoot>$(TestArchiveRoot)runtime/</TestArchiveRuntimeRoot>
+
+ <!-- project file to use when resolving ReferenceFromRuntime items -->
+ <RuntimeProjectFile Condition="'$(RuntimeProjectFile)' == ''">$(MSBuildThisFileDirectory)restore\runtime\runtime.depproj</RuntimeProjectFile>
+
+ <!-- Paths to binplace package content -->
+ <NETCoreAppPackageRefPath>$(ArtifactsBinDir)pkg\netcoreapp\ref</NETCoreAppPackageRefPath>
+ <NETCoreAppPackageRuntimePath>$(ArtifactsBinDir)pkg\netcoreapp\lib</NETCoreAppPackageRuntimePath>
+ <NetFxPackageRefPath>$(ArtifactsBinDir)pkg\netfx\ref</NetFxPackageRefPath>
+ <NetFxPackageRuntimePath>$(ArtifactsBinDir)pkg\netfx\lib</NetFxPackageRuntimePath>
+
+ <TestHostRootPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'testhost', '$(BuildConfiguration)'))</TestHostRootPath>
+
+ <!-- interop is not available on NETStandard1.0 -->
+ <IncludeDllSafeSearchPathAttribute Condition="'$(TargetFramework)' == 'netstandard1.0'">false</IncludeDllSafeSearchPathAttribute>
+
+ <VersionFileForPackages Condition="'$(VersionFileForPackages)' == ''">$(ArtifactsObjDir)version.txt</VersionFileForPackages>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(BuildAllConfigurations)' != 'true'">
+ <!-- We add extra binplacing for the test shared framework until we can get hardlinking with the runtime directory working on all platforms -->
+ <BinPlaceTestSharedFramework Condition="'$(_bc_TargetGroup)' == 'netcoreapp'">true</BinPlaceTestSharedFramework>
+ <BinPlaceNETFXRuntime Condition="'$(_bc_TargetGroup)' == 'netfx'">true</BinPlaceNETFXRuntime>
+
+ <NETCoreAppTestSharedFrameworkPath>$([MSBuild]::NormalizeDirectory('$(TestHostRootPath)', 'shared', 'Microsoft.NETCore.App', '$(ProductVersion)'))</NETCoreAppTestSharedFrameworkPath>
+
+ <TestHostRuntimePath Condition="'$(BinPlaceTestSharedFramework)' == 'true'">$(NETCoreAppTestSharedFrameworkPath)</TestHostRuntimePath>
+ <TestHostRuntimePath Condition="'$(BinPlaceNETFXRuntime)' == 'true'">$(TestHostRootPath)</TestHostRuntimePath>
+
+ <PlatformManifestFile>$(TestHostRuntimePath)PlatformManifest.txt</PlatformManifestFile>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(PlatformManifestFile)' != '' and '$(IsTestProject)' == 'true'">
+ <PackageConflictPlatformManifests Include="$(PlatformManifestFile)" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <!-- F5 and debugging support for netcoreapp and netfx inside VS. -->
+ <EnableLaunchSettings Condition="'$(EnableLaunchSettings)' == '' and '$(DotNetBuildFromSource)' != 'true'">true</EnableLaunchSettings>
+ </PropertyGroup>
+
+ <!-- Test properties for full build. -->
+ <PropertyGroup Condition="'$(TestAllProjects)' == 'true'">
+ <GenerateFullCoverageReport Condition="'$(GenerateFullCoverageReport)' == ''">true</GenerateFullCoverageReport>
+ </PropertyGroup>
+
+ <Import Project="$(RepositoryEngineeringDir)references.props" />
+
+ <!-- Import it at the end of the props file to override the OutputPath for reference assemblies and use common directory props -->
+ <Import Project="$(RepositoryEngineeringDir)referenceAssemblies.props" />
+
+ <PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
+ <!-- Set the documentation output file globally. -->
+ <DocumentationFile Condition="'$(DocumentationFile)' == ''">$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
+ </PropertyGroup>
+
+ <!-- Additional optimizations -->
+ <PropertyGroup>
+ <!-- Clear the init locals flag on all src projects, except those in VB, where we can't use spans. -->
+ <ILLinkClearInitLocals Condition="'$(IsSourceProject)' == 'true' and '$(Language)' != 'VB'">true</ILLinkClearInitLocals>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- Experimental packages should not be stable -->
+ <SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(MSBuildProjectName.Contains('Experimental'))">true</SuppressFinalPackageVersion>
+ <IsShippingAssembly Condition="$(MSBuildProjectName.Contains('Experimental'))">false</IsShippingAssembly>
+
+ <!-- We don't want Private packages to be shipped to NuGet.org -->
+ <IsShippingPackage Condition="$(MSBuildProjectName.Contains('Private')) and '$(MSBuildProjectExtension)' == '.pkgproj'">false</IsShippingPackage>
+ </PropertyGroup>
<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
@@ -19,8 +381,8 @@
<!-- Use msbuild path functions as that property is used in bash scripts. -->
<ItemGroup>
- <CoverageExcludeFile Include="$([MSBuild]::NormalizePath('$(SourceDir)', 'Common', 'src', 'System', 'SR.*'))" />
- <CoverageExcludeFile Include="$([MSBuild]::NormalizePath('$(SourceDir)', 'Common', 'src', 'System', 'NotImplemented.cs'))" />
+ <CoverageExcludeFile Include="$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Common', 'src', 'System', 'SR.*'))" />
+ <CoverageExcludeFile Include="$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'Common', 'src', 'System', 'NotImplemented.cs'))" />
</ItemGroup>
<ItemGroup>
@@ -49,5 +411,5 @@
<CLSCompliant Condition="'$(CLSCompliant)' == ''">true</CLSCompliant>
</PropertyGroup>
- <Import Condition="'$(EnableProjectRestore)' == 'true' and '$(IsSourceProject)' == 'true' and '$(MSBuildProjectExtension)' != '.ilproj'" Project="$(RepositoryEngineeringDir)Analyzers.props" />
+ <Import Condition="'$(EnableProjectRestore)' == 'true' and '$(IsSourceProject)' == 'true' and '$(MSBuildProjectExtension)' != '.ilproj'" Project="$(RepositoryEngineeringDir)analyzers.props" />
</Project>
diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index 8791f596c24..16dba9a54ce 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -1,12 +1,153 @@
<Project InitialTargets="AddSkipGetTargetFrameworkToProjectReferences">
<PropertyGroup>
<!-- Reset these properties back to blank, since they are defaulted by Microsoft.NET.Sdk -->
- <FileAlignment Condition="'$(FileAlignment)' == '512'"></FileAlignment>
- <ErrorReport Condition="'$(ErrorReport)' == 'prompt'"></ErrorReport>
- <WarningsAsErrors Condition="'$(WarningsAsErrors)' == 'NU1605'"></WarningsAsErrors>
+ <FileAlignment Condition="'$(FileAlignment)' == '512'" />
+ <ErrorReport Condition="'$(ErrorReport)' == 'prompt'" />
+ <WarningsAsErrors Condition="'$(WarningsAsErrors)' == 'NU1605'" />
</PropertyGroup>
- <Import Project="..\Directory.Build.targets" />
+ <PropertyGroup>
+ <!--
+ For non-SDK projects that import this file and then import Microsoft.Common.targets,
+ tell Microsoft.Common.targets not to import Directory.Build.targets again
+ -->
+ <ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
+ <!-- This is a workaround to allow the SDK to accept the netcoreapp5.0 tfm until the SDK supports targeting this tfm. -->
+ <NETCoreAppMaximumVersion>5.0</NETCoreAppMaximumVersion>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- Override strong name key to default to Open for test projects,
+ Tests which wish to control this should set TestStrongNameKeyId. -->
+ <TestStrongNameKeyId Condition="'$(TestStrongNameKeyId)' == ''">Open</TestStrongNameKeyId>
+ <StrongNameKeyId Condition="'$(IsTestProject)' == 'true'">$(TestStrongNameKeyId)</StrongNameKeyId>
+ </PropertyGroup>
+
+ <Import Project="$(RepositoryEngineeringDir)resources.targets" />
+ <Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
+
+ <PropertyGroup>
+ <ArtifactsPackagesDir>$([MSBuild]::NormalizePath('$(ArtifactsDir)', 'packages', '$(ConfigurationGroup)'))</ArtifactsPackagesDir>
+ <ArtifactsShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsPackagesDir)', 'Shipping'))</ArtifactsShippingPackagesDir>
+ <ArtifactsNonShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsPackagesDir)', 'NonShipping'))</ArtifactsNonShippingPackagesDir>
+
+ <PackageOutputPath Condition="'$(IsShippingPackage)' == 'true'">$(ArtifactsShippingPackagesDir)</PackageOutputPath>
+ <PackageOutputPath Condition="'$(IsShippingPackage)' != 'true'">$(ArtifactsNonShippingPackagesDir)</PackageOutputPath>
+ </PropertyGroup>
+
+ <Import Project="$(RepositoryEngineeringDir)versioning.targets" />
+
+ <!-- Corefx-specific binplacing properties -->
+ <PropertyGroup>
+ <IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' AND '$(IsReferenceAssembly)' != 'true' AND '$(BinPlaceRef)' != 'true' AND '$(IsTestProject)' != 'true'">true</IsRuntimeAssembly>
+ <!-- Try to determine if this is a simple library without a ref project.
+ https://github.com/dotnet/corefx/issues/14291 is tracking cleaning this up -->
+ <IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(LibrariesProjectRoot)$(MSBuildProjectName)') and !Exists('$(LibrariesProjectRoot)$(MSBuildProjectName)/ref') and !$(MSBuildProjectName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
+ <IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == ''">$(IsNETCoreApp)</IsNETCoreAppRef>
+ <IsNetFxNETStandardRef Condition="'$(IsNetFxNETStandardRef)' == ''">$(IsNetFxNETStandard)</IsNetFxNETStandardRef>
+
+ <BinPlaceRef Condition="'$(BinPlaceRef)' == '' And ('$(IsReferenceAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
+ <BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' OR '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
+ <!-- binplace to directories for the target vertical -->
+ <BinPlaceConfiguration Include="$(_bc_TargetGroup)-$(_bc_OSGroup)">
+ <RefPath>$(BuildConfigurationRefPath)</RefPath>
+ <RuntimePath>$(RuntimePath)</RuntimePath>
+ </BinPlaceConfiguration>
+ <!-- binplace to directories for packages -->
+ <BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' AND '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
+ <PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath>
+ <PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath>
+ <RuntimePath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true'">$(NETCoreAppPackageRuntimePath)\..\runtime</RuntimePath>
+ <RefPath Condition="'$(BinPlaceNETCoreAppPackage)' == 'true' AND '$(IsNETCoreAppRef)' == 'true'">$(RefRootPath)microsoft.netcore.app</RefPath>
+ <!-- enable trimming for any runtime project that's part of the shared framework and hasn't already set ILLinkTrimAssembly -->
+ <SetProperties Condition="'$(BinPlaceRuntime)' == 'true' AND '$(ILLinkTrimAssembly)' == ''">ILLinkTrimAssembly=true</SetProperties>
+ </BinPlaceConfiguration>
+
+ <!-- Setup the shared framework directory for testing -->
+ <BinPlaceConfiguration Condition="'$(BinPlaceTestSharedFramework)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
+ <RuntimePath>$(NETCoreAppTestSharedFrameworkPath)</RuntimePath>
+ </BinPlaceConfiguration>
+ <BinPlaceConfiguration Condition="'$(BinPlaceNETFXRuntime)' == 'true'" Include="netfx-Windows_NT">
+ <RuntimePath>$(TestHostRootPath)</RuntimePath>
+ </BinPlaceConfiguration>
+
+ <!-- binplace targeting packs which may be different from BuildConfiguration -->
+ <BinPlaceConfiguration Include="netstandard2.0">
+ <RefPath>$(NetStandard20RefPath)</RefPath>
+ </BinPlaceConfiguration>
+ <BinPlaceConfiguration Include="netstandard2.1">
+ <RefPath>$(NetStandard21RefPath)</RefPath>
+ </BinPlaceConfiguration>
+ <!-- some libraries that produce packages will remain targeting netcoreapp2.0 -->
+ <BinPlaceConfiguration Condition="'$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp2.0">
+ <RefPath>$(RefRootPath)netcoreapp2.0/</RefPath>
+ </BinPlaceConfiguration>
+ <!-- for BuildAllConfigurations make sure all refpaths are created. -->
+ <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'" Include="@(TargetGroups)">
+ <RefPath>$(RefRootPath)%(Identity)/</RefPath>
+ </BinPlaceConfiguration>
+ <!-- for BuildAllConfigurations make sure runtimepaths are created for all vertical targetgroups. -->
+ <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
+ <RuntimePath>$(ArtifactsBinDir)runtime/%(Identity)-$(ConfigurationGroup)-$(ArchGroup)</RuntimePath>
+ </BinPlaceConfiguration>
+
+ <BinPlaceConfiguration Include="@(AdditionalBinPlaceConfiguration)" />
+ </ItemGroup>
+
+ <Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
+ <Import Project="$(RepositoryEngineeringDir)depProj.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
+ <Import Project="$(RepositoryEngineeringDir)references.targets" />
+ <Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
+
+ <Import Sdk="Microsoft.DotNet.Build.Tasks.Configuration" Project="Sdk.targets" />
+ <Import Sdk="Microsoft.DotNet.CoreFxTesting" Project="Sdk.targets" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(BuildAllConfigurations)' != 'true'" />
+ <Import Condition="'$(EnableProjectRestore)' != 'true'" Project="$(RepositoryEngineeringDir)restore\repoRestore.targets" />
+
+ <Import Project="$(RepositoryEngineeringDir)referenceFromRuntime.targets" />
+ <Import Project="$(RepositoryEngineeringDir)illink.targets" />
+ <Import Project="$(RepositoryEngineeringDir)notSupported.SourceBuild.targets" Condition="'$(DotNetBuildFromSource)' == 'true'" />
+
+ <Target Name="ReportConfigurationErrorMessage"
+ BeforeTargets="AssignProjectConfiguration"
+ Condition="'$(BuildConfigurations)' != ''" >
+ <Message Importance="Low" Text="$(MSBuildProjectFullPath), C: $(Configuration) BC: $(BuildConfiguration) BCs: $(BuildConfigurations)" />
+ <Message Importance="High" Condition="'$(ConfigurationErrorMsg)' != ''" Text="$(MSBuildProjectFullPath) ConfigurationErrorMessage: $(ConfigurationErrorMsg)" />
+ </Target>
+
+ <Target Name="GenerateReferenceSource">
+ <PropertyGroup>
+ <_RefSourceFileOutputPath>$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '..', 'ref', '$(AssemblyName).cs'))</_RefSourceFileOutputPath>
+ <_ExcludeAPIList>$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt</_ExcludeAPIList>
+ <_LicenseHeaderTxtPath>$(RepositoryEngineeringDir)LicenseHeader.txt</_LicenseHeaderTxtPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <_GenAPICmd>$(_GenAPICommand)</_GenAPICmd>
+ <_GenAPICmd>$(_GenAPICmd) "@(IntermediateAssembly)"</_GenAPICmd>
+ <_GenAPICmd>$(_GenAPICmd) --lib-path "$(RefPath.Trim('\/'))"</_GenAPICmd>
+ <_GenAPICmd>$(_GenAPICmd) --out "$(_RefSourceFileOutputPath)"</_GenAPICmd>
+ <_GenAPICmd>$(_GenAPICmd) --exclude-attributes-list "$(_ExcludeAPIList)"</_GenAPICmd>
+ <_GenAPICmd>$(_GenAPICmd) --header-file "$(_LicenseHeaderTxtPath)"</_GenAPICmd>
+ <_GenAPICmd Condition="'$(LangVersion)' != ''">$(_GenAPICmd) --lang-version "$(LangVersion)"</_GenAPICmd>
+ </PropertyGroup>
+
+ <Exec Command="$(_GenAPICmd)" />
+ <Message Text="Generated reference assembly source code: $(_RefSourceFileOutputPath)" />
+ </Target>
+
+ <!-- Import Packaging targets -->
+ <Import Project="$(RepositoryEngineeringDir)packaging.targets" />
+
+ <Import Project="$(RepositoryEngineeringDir)disableSourceControlManagement.targets" Condition="'$(EnableSourceLink)' == 'false'" />
+
+ <!-- Define this now until we can clean-up targets that depend on it in the packaging targets -->
+ <Target Name="CreateVersionFileDuringBuild" />
+
+ <!-- Define this target to override the workaround in arcade as we don't need it for our pkgprojs -->
+ <Target Name="InitializeStandardNuspecProperties" />
<Target Name="AddSkipGetTargetFrameworkToProjectReferences" Condition="'@(ProjectReference)' != ''">
<ItemGroup>
@@ -39,7 +180,7 @@
Hack workaround to skip the GenerateCompiledExpressionsTempFile target in
Microsoft.WorkflowBuildExtensions.targets target that always runs in VS
-->
- <GenerateCompiledExpressionsTempFilePathForEditing></GenerateCompiledExpressionsTempFilePathForEditing>
+ <GenerateCompiledExpressionsTempFilePathForEditing />
</PropertyGroup>
<!-- Returns the assembly version of the project for consumption
diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj
index c0b5fe83cdc..8fd09083fd7 100644
--- a/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj
+++ b/src/libraries/System.IO.FileSystem.Watcher/src/System.IO.FileSystem.Watcher.csproj
@@ -88,7 +88,7 @@
</ItemGroup>
<ItemGroup Condition=" '$(TargetsOSX)' == 'true'">
<Compile Include="System\IO\FileSystemWatcher.OSX.cs" />
- <Compile Include="$(SourceDir)System.IO.FileSystem\src\System\IO\FileSystem.Exists.Unix.cs">
+ <Compile Include="$(LibrariesProjectRoot)System.IO.FileSystem\src\System\IO\FileSystem.Exists.Unix.cs">
<Link>System.IO.FileSystem\src\System\IO\FileSystem.Exists.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\OSX\Interop.EventStream.cs">
diff --git a/src/libraries/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj b/src/libraries/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj
index a1cdff58537..60de0a4025b 100644
--- a/src/libraries/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj
+++ b/src/libraries/System.Private.Xml/tests/XmlResolver/System.Xml.XmlResolver.Tests/System.Xml.XmlResolver.Tests.csproj
@@ -4,31 +4,31 @@
<Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-frameset.dtd">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-frameset.dtd">
<Link>Utils\DTDs\XHTML10\no_comments\xhtml1-frameset.dtd</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-strict.dtd">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-strict.dtd">
<Link>Utils\DTDs\XHTML10\no_comments\xhtml1-strict.dtd</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-transitional.dtd">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-transitional.dtd">
<Link>Utils\DTDs\XHTML10\no_comments\xhtml1-transitional.dtd</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml-lat1.ent">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml-lat1.ent">
<Link>Utils\DTDs\XHTML10\no_comments\xhtml-lat1.ent</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml-special.ent">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml-special.ent">
<Link>Utils\DTDs\XHTML10\no_comments\xhtml-special.ent</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml-symbol.ent">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml-symbol.ent">
<Link>Utils\DTDs\XHTML10\no_comments\xhtml-symbol.ent</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\RSS091\no_comments\rss-0.91.dtd">
+ <None Include="$(LibrariesProjectRoot)System.Private.Xml\src\Utils\DTDs\RSS091\no_comments\rss-0.91.dtd">
<Link>Utils\DTDs\RSS091\no_comments\rss-0.91.dtd</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
diff --git a/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj b/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj
index dff6b293fd5..1062d45ed63 100644
--- a/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj
+++ b/src/libraries/System.Runtime.CompilerServices.Unsafe/pkg/System.Runtime.CompilerServices.Unsafe.pkgproj
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<ItemGroup>
- <PackageIndex Include="$(RepoRoot)\pkg\baseline\packageBaseline.1.1.json" />
+ <PackageIndex Include="$(PkgDir)baseline\packageBaseline.1.1.json" />
<ProjectReference Include="..\ref\System.Runtime.CompilerServices.Unsafe.csproj">
<SupportedFramework>net45;netcoreapp1.0;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
diff --git a/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj b/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj
index 0609cbce6ab..dab61e9fd8c 100644
--- a/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj
+++ b/src/libraries/System.Runtime.Serialization.Json/src/System.Runtime.Serialization.Json.csproj
@@ -5,7 +5,7 @@
<Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <ProjectReference Include="$(SourceDir)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
+ <ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
diff --git a/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj b/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj
index 465f1d79ab2..a9a45f4a248 100644
--- a/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj
+++ b/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj
@@ -17,7 +17,7 @@
<Compile Include="System.Runtime.WindowsRuntime.Manual.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
- <ProjectReference Include="$(RepositoryEngineeringDir)restore\winrt\winrt.depproj" />
+ <ProjectReference Include="$(LibrariesProjectRoot)restore\winrt\winrt.depproj" />
<ProjectReference Include="..\..\mscorlib.WinRT-Facade\ref\mscorlib.WinRT-Facade.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.Extensions\ref\System.Runtime.Extensions.csproj" />
@@ -25,7 +25,7 @@
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetStandard)' == 'true'">
- <ProjectReference Include="$(RepositoryEngineeringDir)restore\winrt\winrt.depproj" />
+ <ProjectReference Include="$(LibrariesProjectRoot)restore\winrt\winrt.depproj" />
<ProjectReference Include="..\..\mscorlib.WinRT-Facade\ref\mscorlib.WinRT-Facade.csproj" />
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj b/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj
index ce9ad41efed..88479df2fa9 100644
--- a/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj
+++ b/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj
@@ -19,7 +19,7 @@
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<Reference Include="mscorlib" />
<Reference Include="Windows" />
- <ProjectReference Include="$(RepositoryEngineeringDir)restore\winrt\winrt.depproj" />
+ <ProjectReference Include="$(LibrariesProjectRoot)restore\winrt\winrt.depproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<!-- Needed for the compiler to resolve IObservableMap.MapChanged. -->
@@ -116,7 +116,7 @@
<Reference Include="System.IO" />
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.Resources.ResourceManager" />
- <ProjectReference Include="$(RepositoryEngineeringDir)restore\winrt\winrt.depproj" />
+ <ProjectReference Include="$(LibrariesProjectRoot)restore\winrt\winrt.depproj" />
<ProjectReference Include="..\..\mscorlib.WinRT-Facade\ref\mscorlib.WinRT-Facade.csproj" />
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/src/libraries/build.proj b/src/libraries/build.proj
index f3f7206806e..2d14f266047 100644
--- a/src/libraries/build.proj
+++ b/src/libraries/build.proj
@@ -20,11 +20,11 @@
<Target Name="Restore" DependsOnTargets="GenerateConfigurationProps">
<ItemGroup Condition="'$(DirectoryToBuild)' == ''">
- <_RestoreProjects Include="$(RepositoryEngineeringDir)restore\dirs.proj" Build="true" />
+ <_RestoreProjects Include="$(MSBuildThisFileDirectory)restore\dirs.proj" Build="true" />
</ItemGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
- <_RestoreProjects Include="$(SourceDir)tests.proj" Build="false" />
+ <_RestoreProjects Include="$(MSBuildThisFileDirectory)tests.proj" Build="false" />
</ItemGroup>
<MSBuild Projects="@(_RestoreProjects)" Targets="Restore" Properties="$(ProjectProperties)" />
@@ -33,7 +33,7 @@
<Target Name="BuildNative">
<ItemGroup>
- <_BuildNativeProjects Include="src\Native\build-native.proj" />
+ <_BuildNativeProjects Include="$(MSBuildThisFileDirectory)Native\build-native.proj" />
</ItemGroup>
<MSBuild Projects="@(_BuildNativeProjects)" Properties="$(ProjectProperties)" />
@@ -41,7 +41,7 @@
<Target Name="BuildManaged">
<ItemGroup>
- <_BuildMangedProjects Include="src\dirs.proj" />
+ <_BuildMangedProjects Include="$(MSBuildThisFileDirectory)dirs.proj" />
</ItemGroup>
<MSBuild Projects="@(_BuildMangedProjects)" Properties="$(ProjectProperties)" />
@@ -49,7 +49,7 @@
<Target Name="BuildTests">
<ItemGroup>
- <_TestProjects Include="src\tests.proj" />
+ <_TestProjects Include="$(MSBuildThisFileDirectory)tests.proj" />
</ItemGroup>
<MSBuild Projects="@(_TestProjects)"
@@ -59,7 +59,7 @@
<Target Name="Test">
<ItemGroup>
- <_TestProjects Include="src\tests.proj" />
+ <_TestProjects Include="$(MSBuildThisFileDirectory)tests.proj" />
</ItemGroup>
<MSBuild Projects="@(_TestProjects)"
@@ -69,7 +69,7 @@
<Target Name="Pack">
<ItemGroup>
- <_PackProjects Include="src\packages.builds" />
+ <_PackProjects Include="$(MSBuildThisFileDirectory)packages.builds" />
</ItemGroup>
<MSBuild Projects="@(_PackProjects)" Properties="$(ProjectProperties)" />
@@ -82,11 +82,11 @@
<!-- set up inputs for UpdateVSConfigurations in a target to avoid globbing all the time -->
<Target Name="_setProjectsToUpdate" BeforeTargets="UpdateVSConfigurations">
<ItemGroup>
- <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*csproj"
- Exclude="$(MSBuildThisFileDirectory)src/shims/**/*.*csproj"/>
- <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*ilproj" />
- <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)src/**/*.*vbproj" />
- <_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)src/*/Directory.Build.props" />
+ <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)**/*.*csproj"
+ Exclude="$(MSBuildThisFileDirectory)shims/**/*.*csproj"/>
+ <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)**/*.*ilproj" />
+ <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)**/*.*vbproj" />
+ <_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)*/Directory.Build.props" />
<SolutionsToUpdate Include="@(_solutionsToUpdateFiles->'%(RootDir)%(Directory)')" Exclude="@(_solutionsToExcludeFromUpdate)" />
</ItemGroup>
</Target>
diff --git a/eng/dir.traversal.targets b/src/libraries/dir.traversal.targets
index f0e86873831..93dc138f62c 100644
--- a/eng/dir.traversal.targets
+++ b/src/libraries/dir.traversal.targets
@@ -1,5 +1,5 @@
<Project DefaultTargets="Build">
- <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.targets" />
<Target Name="BuildAllProjects" DependsOnTargets="FilterProjects">
<PropertyGroup>
diff --git a/src/libraries/dirs.proj b/src/libraries/dirs.proj
index 0e737917106..11848d10071 100644
--- a/src/libraries/dirs.proj
+++ b/src/libraries/dirs.proj
@@ -1,5 +1,5 @@
<Project>
- <Import Project="Directory.Build.props" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.props" />
<!-- required to build the projects in their specified order -->
<PropertyGroup>
@@ -21,5 +21,5 @@
<Project Include="src.builds" />
</ItemGroup>
- <Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
+ <Import Project="$(MSBuildThisFileDirectory)dir.traversal.targets" />
</Project> \ No newline at end of file
diff --git a/src/libraries/packages.builds b/src/libraries/packages.builds
index 9cca0099aa2..43365dc2b2f 100644
--- a/src/libraries/packages.builds
+++ b/src/libraries/packages.builds
@@ -1,12 +1,12 @@
<Project>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.props" />
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
<AdditionalBuildConfigurations>$(AdditionalBuildConfigurations);package-$(ConfigurationGroup)</AdditionalBuildConfigurations>
</PropertyGroup>
<ItemGroup Condition="'$(SkipManagedPackageBuild)' != 'true'">
- <Project Include="$(MSBuildThisFileDirectory)..\pkg\*\*.builds" >
+ <Project Include="$(PkgDir)*\*.builds" >
<AdditionalProperties>$(AdditionalProperties)</AdditionalProperties>
</Project>
<Project Include="*\pkg\**\*.pkgproj" Condition="'$(BuildAllConfigurations)' == 'true' OR '$(DotNetBuildFromSource)' == 'true'">
@@ -15,7 +15,7 @@
</ItemGroup>
<!-- Need the PackageIndexFile file property from baseline.props -->
- <Import Project="../pkg/baseline/baseline.props" />
+ <Import Project="$(PkgDir)baseline\baseline.props" />
<UsingTask TaskName="UpdatePackageIndex" AssemblyFile="$(PackagingTaskDir)Microsoft.DotNet.Build.Tasks.Packaging.dll"/>
@@ -34,7 +34,7 @@
The private packages don't get stabilized so they don't need to be included
in the set of packages that we are gathering stable versions from.
-->
- <PkgProjects Include="$(MSBuildThisFileDirectory)..\pkg\*\*.pkgproj" Exclude="$(MSBuildThisFileDirectory)..\pkg\*Private*\*.pkgproj" />
+ <PkgProjects Include="$(PkgDir)*\*.pkgproj" Exclude="$(MSBuildThisFileDirectory)pkg\*Private*\*.pkgproj" />
<PkgProjects Include="*\pkg\**\*.pkgproj" />
</ItemGroup>
@@ -69,5 +69,5 @@
Overwrite="true" />
</Target>
- <Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
+ <Import Project="$(MSBuildThisFileDirectory)dir.traversal.targets" />
</Project>
diff --git a/src/libraries/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj b/src/libraries/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj
index def37549519..3d61537dff5 100644
--- a/src/libraries/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj
+++ b/src/libraries/pkg/Microsoft.Private.CoreFx.OOB/Microsoft.Private.CoreFx.OOB.pkgproj
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build" InitialTargets="FindNetCoreAppPackages">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
- <!-- We use the PackageVersion property defined in Packaging.props for the Prerelease packages which are using it to be built -->
+ <!-- We use the PackageVersion property defined in packaging.props for the Prerelease packages which are using it to be built -->
<_PreReleasePackageVersion>$(PackageVersion)</_PreReleasePackageVersion>
<!-- We don't need to harvest the stable packages to build this -->
<HarvestStablePackage>false</HarvestStablePackage>
@@ -10,7 +10,7 @@
<Target Name="FindNetCoreAppPackages">
<ItemGroup>
- <PkgProjGlobPath Include="$(SourceDir)/**/*.pkgproj" />
+ <PkgProjGlobPath Include="$(LibrariesProjectRoot)*\pkg\**\*.pkgproj" />
</ItemGroup>
<MSBuild Projects="@(PkgProjGlobPath)"
diff --git a/src/libraries/pkg/dir.traversal.targets b/src/libraries/pkg/dir.traversal.targets
index c3864734a02..b1da72a85fa 100644
--- a/src/libraries/pkg/dir.traversal.targets
+++ b/src/libraries/pkg/dir.traversal.targets
@@ -1,5 +1,5 @@
<Project>
- <Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
+ <Import Project="..\dir.traversal.targets" />
<PropertyGroup Condition="'$(BuildingAnOfficialBuildLeg)' == 'true'">
<!-- During an official build, only build identity packages in the AllConfigurations build -->
diff --git a/src/libraries/pkg/test/testPackages.proj b/src/libraries/pkg/test/testPackages.proj
index 5afbba5768f..17a889fb084 100644
--- a/src/libraries/pkg/test/testPackages.proj
+++ b/src/libraries/pkg/test/testPackages.proj
@@ -42,7 +42,7 @@
<TestSupportFiles Include="$(DotNetRoot)**\*.*" Exclude="$(DotNetRoot)sdk\NuGetFallbackFolder\**\*.*">
<DestinationFolder>$(TestToolsDir)%(RecursiveDir)</DestinationFolder>
</TestSupportFiles>
- <TestSupportFiles Include="$(SourceDir)shims\netfxreference.props">
+ <TestSupportFiles Include="$(LibrariesProjectRoot)shims\netfxreference.props">
<DestinationFolder>$(TestToolsDir)</DestinationFolder>
</TestSupportFiles>
<TestSupportFiles Include="$(RepositoryEngineeringDir)versions.props">
diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj
index 12026ee9bee..25ed7f64c54 100644
--- a/src/libraries/pretest.proj
+++ b/src/libraries/pretest.proj
@@ -31,7 +31,7 @@
<!-- Generate launch settings support files to enable VS debugging. -->
<Target Name="GenerateLaunchSettingsFiles" Condition="'$(EnableLaunchSettings)' == 'true'">
<PropertyGroup>
- <_TestProjectRootDir>$(SourceDir)</_TestProjectRootDir>
+ <_TestProjectRootDir>$(LibrariesProjectRoot)</_TestProjectRootDir>
<_TestProjectRootDir Condition="'$(DirectoryToBuild)'!=''">$(DirectoryToBuild)</_TestProjectRootDir>
</PropertyGroup>
<ItemGroup>
diff --git a/eng/publishTestAssets.proj b/src/libraries/publishTestAssets.proj
index 3d50cfafdb0..eae1362f1bc 100644
--- a/eng/publishTestAssets.proj
+++ b/src/libraries/publishTestAssets.proj
@@ -1,9 +1,9 @@
<Project DefaultTargets="PublishTestAssets">
- <Import Project="..\Directory.Build.props" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.props" />
<!-- We need to import Directory.Build.targets at the beginning because there is where we import the restored tools targets, in
this case we need Microsoft.DotNet.Build.Tasks.Feed targets to be imported. -->
- <Import Project="..\Directory.Build.targets" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.targets" />
<PropertyGroup>
<AssetManifestDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'TestAssetsManifests'))</AssetManifestDir>
diff --git a/src/libraries/ref.builds b/src/libraries/ref.builds
index fb60f5d8fd0..e8fb99ba782 100644
--- a/src/libraries/ref.builds
+++ b/src/libraries/ref.builds
@@ -1,5 +1,5 @@
<Project DefaultTargets="Build">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.props" />
<PropertyGroup>
<AdditionalBuildConfigurations>$(AdditionalBuildConfigurations);netstandard2.0-$(OSGroup)-$(ConfigurationGroup)-$(ArchGroup);netstandard2.1-$(OSGroup)-$(ConfigurationGroup)</AdditionalBuildConfigurations>
@@ -10,5 +10,5 @@
<Project Condition="'$(DirectoryToBuild)' != ''" Include="$(DirectoryToBuild)\ref\*.*proj" />
</ItemGroup>
- <Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
+ <Import Project="$(MSBuildThisFileDirectory)dir.traversal.targets" />
</Project>
diff --git a/eng/restore/Directory.Build.props b/src/libraries/restore/Directory.Build.props
index 65eeecb86fe..0b5b07b932b 100644
--- a/eng/restore/Directory.Build.props
+++ b/src/libraries/restore/Directory.Build.props
@@ -1,5 +1,5 @@
<Project>
- <Import Project="..\..\Directory.Build.props" />
+ <Import Project="..\Directory.Build.props" />
<PropertyGroup>
<!-- We need configuration-specific assets files. -->
diff --git a/eng/restore/Directory.Build.targets b/src/libraries/restore/Directory.Build.targets
index 07a510536af..4a99b5d4070 100644
--- a/eng/restore/Directory.Build.targets
+++ b/src/libraries/restore/Directory.Build.targets
@@ -1,5 +1,5 @@
<Project>
- <Import Project="..\..\Directory.Build.targets" />
+ <Import Project="..\Directory.Build.targets" />
<PropertyGroup>
<PrereleaseResolveNuGetPackages>true</PrereleaseResolveNuGetPackages>
diff --git a/eng/restore/analyzers/Configurations.props b/src/libraries/restore/analyzers/Configurations.props
index d181ff13b98..d181ff13b98 100644
--- a/eng/restore/analyzers/Configurations.props
+++ b/src/libraries/restore/analyzers/Configurations.props
diff --git a/eng/restore/analyzers/analyzers.depproj b/src/libraries/restore/analyzers/analyzers.depproj
index 27dc13b8a5c..ee614d52326 100644
--- a/eng/restore/analyzers/analyzers.depproj
+++ b/src/libraries/restore/analyzers/analyzers.depproj
@@ -5,7 +5,7 @@
</PropertyGroup>
<!-- Import PackageReferences containing analyzers -->
- <Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
+ <Import Project="$(RepositoryEngineeringDir)analyzers.props" />
<UsingTask TaskName="Microsoft.DotNet.Arcade.Sdk.SaveItems" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
diff --git a/eng/restore/binplacePackages/Configurations.props b/src/libraries/restore/binplacePackages/Configurations.props
index 8c2ad7f6715..8c2ad7f6715 100644
--- a/eng/restore/binplacePackages/Configurations.props
+++ b/src/libraries/restore/binplacePackages/Configurations.props
diff --git a/eng/restore/binplacePackages/binplacePackages.depproj b/src/libraries/restore/binplacePackages/binplacePackages.depproj
index a1b0d6b0934..a1b0d6b0934 100644
--- a/eng/restore/binplacePackages/binplacePackages.depproj
+++ b/src/libraries/restore/binplacePackages/binplacePackages.depproj
diff --git a/eng/restore/dirs.proj b/src/libraries/restore/dirs.proj
index fe8d30165e4..cf1b99f6e1e 100644
--- a/eng/restore/dirs.proj
+++ b/src/libraries/restore/dirs.proj
@@ -18,5 +18,5 @@
<Project Include="binplacePackages/binplacePackages.depproj" />
</ItemGroup>
- <Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
+ <Import Project="..\dir.traversal.targets" />
</Project>
diff --git a/eng/restore/harvestPackages/Configurations.props b/src/libraries/restore/harvestPackages/Configurations.props
index a5bb838e9e0..a5bb838e9e0 100644
--- a/eng/restore/harvestPackages/Configurations.props
+++ b/src/libraries/restore/harvestPackages/Configurations.props
diff --git a/eng/restore/harvestPackages/harvestPackages.depproj b/src/libraries/restore/harvestPackages/harvestPackages.depproj
index bc320e9a922..879fc6cdf1c 100644
--- a/eng/restore/harvestPackages/harvestPackages.depproj
+++ b/src/libraries/restore/harvestPackages/harvestPackages.depproj
@@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
- <Import Project="$(RepoRoot)pkg/baseline/baseline.props" />
+ <Import Project="$(PkgDir)baseline/baseline.props" />
<!-- only restore this project during the build, don't copy any of it's packages
The sole purpose of this project is to download packages that can be examined
@@ -12,7 +12,7 @@
<Target Name="AddPackageDownload">
<ItemGroup>
- <_AllPkgProjs Include="$(RepoRoot)src/**/*.pkgproj" />
+ <_AllPkgProjs Include="$(LibrariesProjectRoot)*\pkg\**\*.pkgproj" />
</ItemGroup>
<!-- Need separate ItemGroups so right metadata gets populated -->
<ItemGroup>
diff --git a/eng/restore/netcoreapp/Configurations.props b/src/libraries/restore/netcoreapp/Configurations.props
index 3fc1d78b054..3fc1d78b054 100644
--- a/eng/restore/netcoreapp/Configurations.props
+++ b/src/libraries/restore/netcoreapp/Configurations.props
diff --git a/eng/restore/netcoreapp/netcoreapp.depproj b/src/libraries/restore/netcoreapp/netcoreapp.depproj
index af7d0259003..af7d0259003 100644
--- a/eng/restore/netcoreapp/netcoreapp.depproj
+++ b/src/libraries/restore/netcoreapp/netcoreapp.depproj
diff --git a/eng/restore/netfx/Configurations.props b/src/libraries/restore/netfx/Configurations.props
index 490a182fc8c..490a182fc8c 100644
--- a/eng/restore/netfx/Configurations.props
+++ b/src/libraries/restore/netfx/Configurations.props
diff --git a/eng/restore/netfx/netfx.depproj b/src/libraries/restore/netfx/netfx.depproj
index 89a96b83926..a15587f911f 100644
--- a/eng/restore/netfx/netfx.depproj
+++ b/src/libraries/restore/netfx/netfx.depproj
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
- <Import Project="$(SourceDir)\shims\netfxreference.props" />
+ <Import Project="$(LibrariesProjectRoot)shims\netfxreference.props" />
<PropertyGroup>
<BinPlaceRef>true</BinPlaceRef>
<BinPlaceRuntime>true</BinPlaceRuntime>
diff --git a/eng/restore/netstandard/Configurations.props b/src/libraries/restore/netstandard/Configurations.props
index 1ed1ca31fef..1ed1ca31fef 100644
--- a/eng/restore/netstandard/Configurations.props
+++ b/src/libraries/restore/netstandard/Configurations.props
diff --git a/eng/restore/netstandard/netstandard.depproj b/src/libraries/restore/netstandard/netstandard.depproj
index dbde334f645..dbde334f645 100644
--- a/eng/restore/netstandard/netstandard.depproj
+++ b/src/libraries/restore/netstandard/netstandard.depproj
diff --git a/eng/restore/runtime/Configurations.props b/src/libraries/restore/runtime/Configurations.props
index 2763918bc10..2763918bc10 100644
--- a/eng/restore/runtime/Configurations.props
+++ b/src/libraries/restore/runtime/Configurations.props
diff --git a/eng/restore/runtime/Directory.Build.props b/src/libraries/restore/runtime/Directory.Build.props
index a86068c18c0..a86068c18c0 100644
--- a/eng/restore/runtime/Directory.Build.props
+++ b/src/libraries/restore/runtime/Directory.Build.props
diff --git a/eng/restore/runtime/runtime.depproj b/src/libraries/restore/runtime/runtime.depproj
index 421434766c7..421434766c7 100644
--- a/eng/restore/runtime/runtime.depproj
+++ b/src/libraries/restore/runtime/runtime.depproj
diff --git a/eng/restore/tools/Configurations.props b/src/libraries/restore/tools/Configurations.props
index b796aca1749..b796aca1749 100644
--- a/eng/restore/tools/Configurations.props
+++ b/src/libraries/restore/tools/Configurations.props
diff --git a/eng/restore/tools/tools.depproj b/src/libraries/restore/tools/tools.depproj
index 579af95223f..579af95223f 100644
--- a/eng/restore/tools/tools.depproj
+++ b/src/libraries/restore/tools/tools.depproj
diff --git a/eng/restore/winrt/Configurations.props b/src/libraries/restore/winrt/Configurations.props
index d7ebc9bbced..d7ebc9bbced 100644
--- a/eng/restore/winrt/Configurations.props
+++ b/src/libraries/restore/winrt/Configurations.props
diff --git a/eng/restore/winrt/winrt.depproj b/src/libraries/restore/winrt/winrt.depproj
index ee9e2f3fa7c..ee9e2f3fa7c 100644
--- a/eng/restore/winrt/winrt.depproj
+++ b/src/libraries/restore/winrt/winrt.depproj
diff --git a/eng/sendtohelix.proj b/src/libraries/sendtohelix.proj
index e3839f7d2a4..e2700324efc 100644
--- a/eng/sendtohelix.proj
+++ b/src/libraries/sendtohelix.proj
@@ -1,10 +1,10 @@
<Project InitialTargets="BuildHelixWorkItems" Sdk="Microsoft.DotNet.Helix.Sdk">
<PropertyGroup>
- <NETCORE_ENGINEERING_TELEMETRY>Test</NETCORE_ENGINEERING_TELEMETRY>
-
<!-- Set helix source -->
<HelixSourcePrefix>pr/</HelixSourcePrefix>
+ <!-- TODO: Consolidate when moved to runtime repository: dotnet/corefx#42170 -->
<HelixSource Condition="'$(HelixSource)' == ''">$(HelixSourcePrefix)dotnet/corefx</HelixSource>
+ <HelixSource Condition="'$(HelixSource)' == '' and '$(IsRuntimeRepository)' == 'true'">$(HelixSourcePrefix)dotnet/runtime</HelixSource>
<HelixSource Condition="'$(BUILD_SOURCEBRANCH)' != ''">$(HelixSource)/$(BUILD_SOURCEBRANCH)</HelixSource>
<!-- Set helix build to build number if available -->
diff --git a/src/libraries/src.builds b/src/libraries/src.builds
index 3ec84cfda32..508f68f077a 100644
--- a/src/libraries/src.builds
+++ b/src/libraries/src.builds
@@ -1,5 +1,5 @@
<Project DefaultTargets="Build">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+ <Import Project="$(MSBuildThisFileDirectory)Directory.Build.props" />
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
<AdditionalBuildConfigurations>$(AdditionalBuildConfigurations);netstandard2.0-$(ConfigurationGroup)</AdditionalBuildConfigurations>
@@ -15,5 +15,5 @@
<Project Include="$(DirectoryToBuild)\src\*.*proj" />
</ItemGroup>
- <Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
+ <Import Project="$(MSBuildThisFileDirectory)dir.traversal.targets" />
</Project>
diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 81b04f3601f..520fb90c9bc 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -16,7 +16,7 @@
</ItemGroup>
<ItemGroup Condition="'$(BuildAllConfigurations)' == 'true'">
- <Project Include="$(RepoRoot)pkg\test\testPackages.proj" />
+ <Project Include="$(MSBuildThisFileDirectory)pkg\test\testPackages.proj" />
</ItemGroup>
<Target Name="IncludeProjectReferences" DependsOnTargets="FilterProjects">