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:
-rw-r--r--Directory.Build.props3
-rw-r--r--Directory.Build.targets3
-rw-r--r--eng/Subsets.props28
-rw-r--r--eng/Tools.props5
-rw-r--r--eng/Version.Details.xml12
-rw-r--r--eng/Versions.props6
-rw-r--r--eng/helixcorefxtests.proj291
-rw-r--r--eng/liveBuilds.targets90
-rw-r--r--eng/packaging.props3
-rw-r--r--eng/pipelines/coreclr/pr.yml2
-rw-r--r--eng/pipelines/coreclr/templates/build-job.yml2
-rw-r--r--eng/pipelines/coreclr/templates/crossgen-comparison-job.yml23
-rw-r--r--eng/pipelines/coreclr/templates/run-test-job.yml4
-rw-r--r--eng/pipelines/coreclr/templates/xplat-pipeline-job.yml11
-rw-r--r--eng/pipelines/installer/azure-pipelines.yml11
-rw-r--r--eng/pipelines/installer/jobs/base-job.yml24
-rw-r--r--eng/pipelines/installer/jobs/bash-build.yml2
-rw-r--r--eng/pipelines/installer/jobs/osx-build.yml2
-rw-r--r--eng/pipelines/installer/jobs/windows-build.yml2
-rw-r--r--eng/pipelines/libraries/base-job.yml10
-rw-r--r--eng/pipelines/libraries/build-job.yml26
-rw-r--r--eng/referenceFromRuntime.targets53
-rw-r--r--src/coreclr/build-test.cmd56
-rwxr-xr-xsrc/coreclr/build-test.sh45
-rw-r--r--src/coreclr/coreclr.proj6
-rw-r--r--src/coreclr/src/.nuget/packaging.props1
-rw-r--r--src/coreclr/tests/build.proj1
-rwxr-xr-xsrc/coreclr/tests/scripts/patch-corefx.py263
-rw-r--r--src/coreclr/tests/src/Common/CoreFX/CoreFX.csproj150
-rw-r--r--src/coreclr/tests/src/Common/Directory.Build.targets16
-rw-r--r--src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj18
-rw-r--r--src/coreclr/tests/src/Common/test_runtime/test_runtime.csproj9
-rw-r--r--src/coreclr/tests/src/Directory.Build.targets33
-rw-r--r--src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj3
-rw-r--r--src/coreclr/tests/src/dirs.proj1
-rw-r--r--src/coreclr/tests/src/runtest.proj14
-rw-r--r--src/installer/Directory.Build.props3
-rw-r--r--src/installer/Directory.Build.targets13
-rw-r--r--src/installer/pkg/Directory.Build.targets4
-rw-r--r--src/installer/pkg/deps/deps.csproj11
-rw-r--r--src/installer/pkg/projects/Directory.Build.targets24
-rw-r--r--src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj5
-rw-r--r--src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj2
-rw-r--r--src/installer/pkg/projects/netcoreapp/sfx/Microsoft.NETCore.App.SharedFx.sfxproj13
-rw-r--r--src/installer/pkg/projects/netcoreapp/src/localnetcoreapp.override.targets202
-rw-r--r--src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj91
-rw-r--r--src/installer/test/PrepareTestAssets/PrepareTestAssets.proj2
-rw-r--r--src/libraries/Directory.Build.props10
-rw-r--r--src/libraries/Directory.Build.targets12
-rw-r--r--src/libraries/restore/dirs.proj1
-rw-r--r--src/libraries/restore/runtime/runtime.depproj47
-rw-r--r--src/libraries/shims/manual/Directory.Build.props10
-rw-r--r--src/libraries/src.builds2
53 files changed, 494 insertions, 1187 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index ca3e02475e2..6c65af67d08 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -60,6 +60,7 @@
<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>
<!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
@@ -89,6 +90,8 @@
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
<!-- Used for launchSettings.json and runtime config files. -->
<AppDesignerFolder>Properties</AppDesignerFolder>
+ <!-- Determine what architecture we are building on. -->
+ <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 7d40eb9ac30..a1589f9f5d5 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -8,6 +8,7 @@
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
</PropertyGroup>
+ <Import Project="$(RepositoryEngineeringDir)/liveBuilds.targets" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" />
<PropertyGroup>
@@ -18,4 +19,4 @@
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
</PropertyGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/eng/Subsets.props b/eng/Subsets.props
index a1ca197fe66..ba5a4493776 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -76,7 +76,7 @@
<!-- Libraries -->
<SubsetName Include="All" Category="Libraries" Description="The .NET libraries comprising the shared framework." />
-
+
<!-- CoreClr -->
<SubsetName Include="All" Category="CoreClr" Description="The .NET runtime." />
@@ -96,14 +96,16 @@
<ProjectToBuild Include="$(RepoToolsLocalDir)regenerate-readme-table.proj" />
</ItemGroup>
- <!-- Libraries sets -->
- <ItemGroup Condition="$(_subsetCategory.Contains('libraries')) and $(_subset.Contains('all'))">
- <ProjectToBuild Include="$(LibrariesProjectRoot)build.proj" />
- </ItemGroup>
-
<!-- CoreClr sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('all'))">
- <ProjectToBuild Include="$(CoreClrProjectRoot)coreclr.proj" />
+ <CoreClrProjectToBuild Include="$(CoreClrProjectRoot)coreclr.proj" BuildInParallel="false" />
+ <ProjectToBuild Include="@(CoreClrProjectToBuild)" />
+ </ItemGroup>
+
+ <!-- Libraries sets -->
+ <ItemGroup Condition="$(_subsetCategory.Contains('libraries')) and $(_subset.Contains('all'))">
+ <LibrariesProjectToBuild Include="$(LibrariesProjectRoot)build.proj" BuildInParallel="false" />
+ <ProjectToBuild Include="@(LibrariesProjectToBuild)" />
</ItemGroup>
<!-- Installer sets -->
@@ -119,23 +121,23 @@
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('depproj'))">
- <DepprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.depproj" SignPhase="Binaries" />
+ <DepprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.depproj" SignPhase="Binaries" BuildInParallel="false" />
<ProjectToBuild Include="@(DepprojProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('pkgproj'))">
- <PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.pkgproj" SignPhase="MsiFiles" />
+ <PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.pkgproj" SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('bundle'))">
- <BundleProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.bundleproj" SignPhase="BundleInstallerFiles" />
+ <BundleProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.bundleproj" SignPhase="BundleInstallerFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(BundleProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('installers'))">
- <InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\installers.proj" />
- <InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\vs-insertion-packages.proj" />
+ <InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\installers.proj" BuildInParallel="false" />
+ <InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\vs-insertion-packages.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(InstallerProjectToBuild)" />
</ItemGroup>
@@ -147,7 +149,7 @@
<TestProjectToBuild Include="$(InstallerProjectRoot)test\HostActivation.Tests\HostActivation.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.DotNet.CoreSetup.Packaging.Tests\Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.csproj" />
- <ProjectToBuild Include="@(TestProjectToBuild)" />
+ <ProjectToBuild Include="@(TestProjectToBuild)" BuildInParallel="false" />
</ItemGroup>
</Project>
diff --git a/eng/Tools.props b/eng/Tools.props
index fa9804318e7..4c399288ad2 100644
--- a/eng/Tools.props
+++ b/eng/Tools.props
@@ -13,14 +13,11 @@
<!-- arcade -->
<PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesVersion)" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />
-
+
<!-- coreclr -->
<!-- Download the package in the initial arcade restore step to work around race conditions when restoring an msbuild SDK. -->
<PackageDownload Include="Microsoft.NET.Sdk.IL" Version="[$(MicrosoftNETSdkILVersion)]" />
- <!-- corefx -->
- <PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsVersion)" />
-
<!-- roslyn -->
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilersToolsetVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 5470f49201c..26ea42ab5bb 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,13 +1,5 @@
<Dependencies>
<ProductDependencies>
- <Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-alpha.1.19563.6">
- <Uri>https://github.com/dotnet/corefx</Uri>
- <Sha>5cee7c97d602f294e27c582d4dab81ec388f1d7b</Sha>
- </Dependency>
- <Dependency Name="Microsoft.NETCore.Targets" Version="5.0.0-alpha.1.19563.6">
- <Uri>https://github.com/dotnet/corefx</Uri>
- <Sha>5cee7c97d602f294e27c582d4dab81ec388f1d7b</Sha>
- </Dependency>
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="5.0.0-alpha.1.19563.6">
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>5cee7c97d602f294e27c582d4dab81ec388f1d7b</Sha>
@@ -28,10 +20,6 @@
<Uri>https://github.com/dotnet/corefx</Uri>
<Sha>cf64918877d98577363bb40d5eafac52beb80a79</Sha>
</Dependency>
- <Dependency Name="Microsoft.NETCore.Runtime.CoreCLR" Version="5.0.0-alpha1.19563.3">
- <Uri>https://github.com/dotnet/coreclr</Uri>
- <Sha>2c4fb3250989f014550882f5d165cdc36ebdbd08</Sha>
- </Dependency>
<Dependency Name="Microsoft.NETCore.ILAsm" Version="5.0.0-alpha1.19563.3">
<Uri>https://github.com/dotnet/coreclr</Uri>
<Sha>2c4fb3250989f014550882f5d165cdc36ebdbd08</Sha>
diff --git a/eng/Versions.props b/eng/Versions.props
index a68129a97b0..3806d733c88 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -49,12 +49,8 @@
<MicrosoftDotNetPlatformAbstractionsVersion>3.0.0</MicrosoftDotNetPlatformAbstractionsVersion>
<!-- CoreClr dependencies -->
<MicrosoftNETCoreILAsmVersion>5.0.0-alpha1.19563.3</MicrosoftNETCoreILAsmVersion>
- <MicrosoftNETCoreRuntimeCoreCLRVersion>5.0.0-alpha1.19563.3</MicrosoftNETCoreRuntimeCoreCLRVersion>
<MicrosoftNETSdkILVersion>5.0.0-alpha1.19563.3</MicrosoftNETSdkILVersion>
<!-- Libraries dependencies -->
- <MicrosoftNETCorePlatformsVersion>5.0.0-alpha.1.19563.6</MicrosoftNETCorePlatformsVersion>
- <MicrosoftPrivateCoreFxNETCoreAppVersion>5.0.0-alpha.1.19562.8</MicrosoftPrivateCoreFxNETCoreAppVersion>
- <MicrosoftNETCoreTargetsVersion>5.0.0-alpha.1.19563.6</MicrosoftNETCoreTargetsVersion>
<SystemTextJsonVersion>5.0.0-alpha.1.19563.6</SystemTextJsonVersion>
<SystemTextEncodingsWebVersion>5.0.0-alpha.1.19563.6</SystemTextEncodingsWebVersion>
<runtimenativeSystemIOPortsVersion>5.0.0-alpha.1.19563.3</runtimenativeSystemIOPortsVersion>
@@ -106,8 +102,6 @@
<LinuxCoreFxOptimizationDataPackage>optimization.linux-x64.ibc.corefx</LinuxCoreFxOptimizationDataPackage>
<MicrosoftPrivateIntellisensePackage>microsoft.private.intellisense</MicrosoftPrivateIntellisensePackage>
<MicrosoftDotNetXUnitConsoleRunnerPackage>Microsoft.DotNet.XUnitConsoleRunner</MicrosoftDotNetXUnitConsoleRunnerPackage>
- <MicrosoftPrivateCoreFxNETCoreAppPackage>Microsoft.Private.CoreFx.NETCoreApp</MicrosoftPrivateCoreFxNETCoreAppPackage>
- <MicrosoftNETCorePlatformsPackage>Microsoft.NETCore.Platforms</MicrosoftNETCorePlatformsPackage>
<MicrosoftNETCoreAppPackage>Microsoft.NETCore.App</MicrosoftNETCoreAppPackage>
<optimizationIBCCoreCLRPackage>optimization.IBC.CoreCLR</optimizationIBCCoreCLRPackage>
<optimizationPGOCoreCLRPackage>optimization.PGO.CoreCLR</optimizationPGOCoreCLRPackage>
diff --git a/eng/helixcorefxtests.proj b/eng/helixcorefxtests.proj
deleted file mode 100644
index 7b14fb1d0ca..00000000000
--- a/eng/helixcorefxtests.proj
+++ /dev/null
@@ -1,291 +0,0 @@
-<Project InitialTargets="BuildHelixWorkItems" DefaultTargets="RunInParallelForEachScenario">
-
- <!-- This project uses the helix SDK, documented at
- https://github.com/dotnet/arcade/tree/master/src/Microsoft.DotNet.Helix/Sdk,
- to send test jobs to helix. -->
-
- <Import Sdk="Microsoft.DotNet.Helix.Sdk" Project="Sdk.props" Condition=" '$(UsesHelixSdk)' == 'true' " />
- <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition=" '$(UsesHelixSdk)' != 'true' "/>
-
- <!-- Import Microsoft.DotNet.Build.Tasks.Feed.targets for `ParseBuildManifest` -->
- <Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
-
- <!-- This project is copies much logic from helixpublishwitharcade.proj, used to send coreclr tests to Helix. -->
-
- <!--
- "RunInParallelForEachScenario" is the "root" target for this Project. It invokes other targets to set up the
- information needed to submit a job to Helix. It does so by "recursively" invoking this project file with
- different properties and targets to run, as well as invoking MSBuild on other project files. In particular,
- it first creates the "correlation payload directory", which is the directory of files used by all Helix
- submissions. Then, it recursively invokes this Project once per scenario (e.g., normal Pri-1 run, JitStress=2
- run, JitStressRegs=8 run, etc.), creating a new set of Helix work items for each scenario. For the CoreFX
- tests, we create one Helix work item for each CoreFX test assembly; there is currently no concept of
- grouping multiple assemblies into a single Helix work item to, for instance, consolidate multiple short-running
- assemblies together. (Note that this grouping is done for the CoreCLR tests in helixpublishwitharcade.proj.)
- -->
- <Target Name="RunInParallelForEachScenario">
- <PropertyGroup>
- <!-- This specifies what properties are needed to be passed down as global properties to a child project. -->
-
- <_PropertiesToPass>
- __BuildArch=$(__BuildArch);
- __BuildOS=$(__BuildOS);
- __BuildType=$(__BuildType);
- Creator=$(_Creator);
- HelixAccessToken=$(_HelixAccessToken);
- HelixBuild=$(_HelixBuild);
- HelixSource=$(_HelixSource);
- HelixTargetQueues=$(_HelixTargetQueues);
- HelixType=$(_HelixType);
- PublishTestResults=$(_PublishTestResults);
- RunCrossGen=$(_RunCrossGen);
- TimeoutPerTestCollectionInMinutes=$(_TimeoutPerTestCollectionInMinutes)
- </_PropertiesToPass>
- </PropertyGroup>
-
- <Error Condition="'$(_Scenarios)' == ''" Text="_Scenarios not set" />
-
- <MSBuild Projects="$(MSBuildProjectFile)" Targets="PrepareCorrelationPayloadDirectory" Properties="Scenarios=$(_Scenarios)" />
-
- <ItemGroup>
- <_Scenarios Include="$(_Scenarios.Split(','))" />
-
- <!-- MSBuild creates a new instance of the project for each %(_Scenarios.Identity) and can build them in parallel. -->
- <_ProjectsToBuild Include="$(MSBuildProjectFile)">
- <AdditionalProperties>$(_PropertiesToPass);Scenario=%(_Scenarios.Identity)</AdditionalProperties>
- </_ProjectsToBuild>
- </ItemGroup>
-
- <PropertyGroup>
- <_BuildInParallel>false</_BuildInParallel>
- <_BuildInParallel Condition=" '@(_ProjectsToBuild->Count())' &gt; '1' ">true</_BuildInParallel>
- </PropertyGroup>
-
- <!-- Invoke MSBuild on this project file once for each Scenario (because of the "batching" defined in "_ProjectsToBuild").
- Set "UsesHelixSdk=true" to indicate we want to invoke Helix on this invocation: create the Helix work items and start
- the jobs. This is done by invoking the "Test" Helix target.
- -->
- <MSBuild Projects="@(_ProjectsToBuild)" Targets="Test" BuildInParallel="$(_BuildInParallel)" StopOnFirstFailure="false" Properties="UsesHelixSdk=true" />
- </Target>
-
- <!-- Define a set of properties that are input to the Project, and that must be passed down to child processes.
- (See "_PropertiesToPass" in target "RunInParallelForEachScenario".) If something can be computed, such as
- properties needed by Helix, they should probably be set in target "BuildHelixWorkItems" instead.
- -->
-
- <PropertyGroup>
- <Creator>$(_Creator)</Creator>
- <HelixAccessToken>$(_HelixAccessToken)</HelixAccessToken>
- <HelixBuild>$(_HelixBuild)</HelixBuild>
- <HelixSource>$(_HelixSource)</HelixSource>
- <HelixTargetQueues>$(_HelixTargetQueues)</HelixTargetQueues>
- <HelixType>$(_HelixType)</HelixType>
-
- <!--
- TODO: ProjectDir, RootBinDir, TestWorkingDir, and TargetsWindows are global properties set in dir.props, remove the property assignment here when we port to arcade.
- -->
- <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)..\</ProjectDir>
- <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)artifacts\bin\coreclr</RootBinDir>
- <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(ProjectDir)artifacts\tests\coreclr\$(__BuildOS).$(__BuildArch).$(__BuildType)\</TestWorkingDir>
- <TargetsWindows Condition="'$(__BuildOS)' == 'Windows_NT'">true</TargetsWindows>
-
- <!-- We have a single, universal exclusion file for all CoreFX test exclusions, for CoreFX tests run
- in the CoreCLR repo. Note in particular that we don't have a unique exclusion file for each test
- assembly, or for each processor architecture, or for each operating system, or for each stress
- scenario type. This means that we generally exclude more tests than is strictly necessary for
- any particular job. However, this mechanism is super simple; we don't need to manage fine-
- grained exclusions; and there really shouldn't be any (or many) exclusions anyway.
- -->
- <CoreFXTestExclusionFile>$(ProjectDir)src\coreclr\tests\CoreFX\CoreFX.issues.rsp</CoreFXTestExclusionFile>
-
- <TestHostRootPath>$(TestWorkingDir)testhost\</TestHostRootPath>
- <TestArchiveRuntimeRoot>$(TestWorkingDir)helix\</TestArchiveRuntimeRoot>
-
- <!-- The VM PDB symbols for Windows live in the same directory as the VM binaries. Set a relative
- path within TestHostRootPath (root of the correlation payload) that we can use to set the
- symbol path for the purpose of getting a good stack trace for debug build VM asserts.
- -->
- <TestHostPDBPath>shared\$(MicrosoftNETCoreAppPackage)\$(ProductVersion)</TestHostPDBPath>
-
- <TestAssetBlobFeedUrl>https://dotnetfeed.blob.core.windows.net/dotnet-core</TestAssetBlobFeedUrl>
- </PropertyGroup>
-
- <PropertyGroup>
- <!--
- For Windows, we need to use "call", since the command is going to be called from a batch script created by Helix.
- We "exit /b" at the end of RunTests.cmd. Helix runs some other commands after ours within the batch script,
- so if we don't use call, then we cause the parent script to exit, and anything after will not be executed.
- The arguments passed in to the run script in are the runtime directory (-r) and the exclusion response file
- passed to xunit (rsp-file).
- -->
- <HelixCommand Condition="'$(TargetsWindows)' == 'true'">call RunTests.cmd -r %HELIX_CORRELATION_PAYLOAD% --rsp-file %HELIX_CORRELATION_PAYLOAD%\CoreFX.issues.rsp </HelixCommand>
- <HelixCommand Condition="'$(TargetsWindows)' != 'true'">./RunTests.sh -r $HELIX_CORRELATION_PAYLOAD --rsp-file $HELIX_CORRELATION_PAYLOAD/CoreFX.issues.rsp </HelixCommand>
- </PropertyGroup>
-
- <!--
- Copy the CoreFX test exclusion response file (which is passed to the xunit console runner) to someplace we can
- access it during the test run. We currently just copy it to the root of the generated .NET Core testhost
- directory, which we use as the root of the correlation directory.
- -->
- <Target Name="CopyRSPFile">
- <Copy
- SourceFiles="$(CoreFXTestExclusionFile)"
- DestinationFolder="$(TestHostRootPath)" />
-
- <Message Importance="High" Text="Copied $(CoreFXTestExclusionFile) into $(TestHostRootPath)" />
- </Target>
-
- <PropertyGroup>
- <!-- Set the name of the scenario file. Note that this is only used in invocations where $(Scenario) is set. -->
- <TestEnvFileName Condition=" '$(TargetsWindows)' == 'true' ">SetStressModes_$(Scenario).cmd</TestEnvFileName>
- <TestEnvFileName Condition=" '$(TargetsWindows)' != 'true' ">SetStressModes_$(Scenario).sh</TestEnvFileName>
- </PropertyGroup>
-
- <Target Name="CreateTestEnvFile">
- <!-- This target creates one __TestEnv file for the single $(Scenario). -->
-
- <PropertyGroup>
- <TestEnvFilePath>$(TestHostRootPath)$(TestEnvFileName)</TestEnvFilePath>
- </PropertyGroup>
-
- <ItemGroup>
- <_ProjectsToBuild Include="$(ProjectDir)src\coreclr\tests\testenvironment.proj">
- <Properties>Scenario=$(Scenario);TestEnvFileName=$(TestEnvFilePath);TargetsWindows=$(TargetsWindows)</Properties>
- </_ProjectsToBuild>
- </ItemGroup>
-
- <MSBuild Projects="@(_ProjectsToBuild)" Targets="CreateTestEnvFile" StopOnFirstFailure="true" />
-
- <Message Importance="High" Text="Created $(TestEnvFilePath) for scenario $(Scenario)" />
- <Error Condition="!Exists('$(TestEnvFilePath)')" Text="File $(TestEnvFilePath) not found!" />
- </Target>
-
- <Target Name="CreateAllScenarioTestEnvFiles">
- <!-- This target creates one __TestEnv file for each of the scenarios in the $(Scenarios) comma-separated list. -->
-
- <ItemGroup>
- <_Scenario Include="$(Scenarios.Split(','))" />
- <_ProjectsToBuild Include="$(MSBuildProjectFile)">
- <AdditionalProperties>Scenario=%(_Scenario.Identity)</AdditionalProperties>
- </_ProjectsToBuild>
- </ItemGroup>
-
- <MSBuild Projects="@(_ProjectsToBuild)" Targets="CreateTestEnvFile" StopOnFirstFailure="true" />
- </Target>
-
- <!--
- Collect all the tasks needed to be run once, to prepare the Helix correlation payload directory.
- This just causes its dependent targets to be run.
- -->
- <Target Name="PrepareCorrelationPayloadDirectory"
- DependsOnTargets="CopyRSPFile;CreateAllScenarioTestEnvFiles" >
- </Target>
-
- <!--
- Parse the test asset manifest at, e.g.,
- https://dotnetfeed.blob.core.windows.net/dotnet-core/corefx-tests/4.6.0-preview6.19264.9/Linux.arm64/netcoreapp/corefx-test-assets.xml
- to figure out the tests to run. This manifest is created by the corefx official build, for use in the coreclr repo.
-
- This creates a "TestAssetBlobInfos" item group, which is used to create the Helix work items.
-
- NOTE: we are running this once for each Scenario, meaning we are reading and parsing it once per scenario. Ideally, we would
- do this once and pass it down to the "BuildHelixWorkItems" task later. That's a little difficult given all the re-invocations
- of this Project we do. It doesn't seem too expensive anyway.
- -->
- <Target Name="GetTestAssetManifest" Condition=" '$(UsesHelixSdk)' == 'true' " >
- <PropertyGroup>
- <_TargetGroup>netcoreapp</_TargetGroup>
- <_AssetManifestPath>$(TestAssetBlobFeedUrl)/corefx-tests/$(MicrosoftPrivateCoreFxNETCoreAppVersion)/$(__BuildOS).$(__BuildArch)/$(_TargetGroup)/corefx-test-assets.xml</_AssetManifestPath>
- </PropertyGroup>
-
- <ParseBuildManifest AssetManifestPath="$(_AssetManifestPath)">
- <Output TaskParameter="BlobInfos" ItemName="TestAssetBlobInfos" />
- </ParseBuildManifest>
- </Target>
-
- <!--
- The following item and property groups are setting things needed by Helix, to describe the jobs
- we are creating. Ideally, we would put them inside the "BuildHelixWorkItems" task, which is what
- we run to create the Helix correlation payload and work item groups. However, the Helix SDK
- references some of these in "InitialTargets", and we don't have control over the order of
- InitialTargets running, so we need to make these "global". All the "global" item and property
- groups will be evaluated before the Helix InitialTargets are run.
- -->
-
- <!-- HelixPreCommands is a set of commands run before the work item command. We use it here to inject
- setting up the per-scenario environment.
- -->
-
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
- <HelixPreCommand Include="set __TestEnv=%HELIX_CORRELATION_PAYLOAD%\$(TestEnvFileName)" />
- <HelixPreCommand Include="type %__TestEnv%" />
- <HelixPreCommand Include="call %__TestEnv%" />
- <!-- Display the interesting COMPlus variables that are set in the environment -->
- <HelixPreCommand Include="set COMPlus" />
- <!-- Set _NT_SYMBOL_PATH so VM _ASSERTE() asserts can find the symbol files when doing stack walks -->
- <HelixPreCommand Include="set _NT_SYMBOL_PATH=%HELIX_CORRELATION_PAYLOAD%\$(TestHostPDBPath)" />
- </ItemGroup>
-
- <ItemGroup Condition=" '$(TargetsWindows)' != 'true' ">
- <HelixPreCommand Include="export __TestEnv=$HELIX_CORRELATION_PAYLOAD/$(TestEnvFileName)" />
- <HelixPreCommand Include="cat $__TestEnv" />
- <HelixPreCommand Include=". $__TestEnv" /> <!-- Use "." not "source"; some clients appear to run scripts with "sh" not "bash" -->
- <!-- Display the interesting COMPlus variables that are set in the environment -->
- <HelixPreCommand Include="printenv | grep COMPlus" />
- </ItemGroup>
-
- <PropertyGroup>
- <HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
- </PropertyGroup>
-
- <PropertyGroup>
- <HelixArchitecture>$(__BuildArch)</HelixArchitecture>
-
- <HelixConfiguration Condition=" '$(Scenario)' == 'normal' ">$(BuildType)</HelixConfiguration>
- <HelixConfiguration Condition=" '$(Scenario)' != 'normal' ">$(BuildType)-$(Scenario)</HelixConfiguration>
-
- <TestRunNamePrefix>CoreFX </TestRunNamePrefix>
- <TestRunNamePrefix Condition=" '$(Scenario)' == 'normal' ">$(TestRunNamePrefix)$(BuildOS) $(BuildArch) $(BuildType) @ </TestRunNamePrefix>
- <TestRunNamePrefix Condition=" '$(Scenario)' != 'normal' ">$(TestRunNamePrefix)$(BuildOS) $(BuildArch) $(BuildType) $(Scenario) @ </TestRunNamePrefix>
-
- <!-- REVIEW: it seems like this should be referencing "PublishTestResults" instead (without the underscore) -->
- <EnableAzurePipelinesReporter>$(_PublishTestResults)</EnableAzurePipelinesReporter>
- <EnableAzurePipelinesReporter Condition=" '$(EnableAzurePipelinesReporter)' == '' ">false</EnableAzurePipelinesReporter>
-
- <EnableXUnitReporter>true</EnableXUnitReporter>
- <FailOnMissionControlTestFailure>true</FailOnMissionControlTestFailure>
- <FailOnWorkItemFailure>true</FailOnWorkItemFailure>
- <WaitForWorkItemCompletion>true</WaitForWorkItemCompletion>
-
- <!-- Specify the retry policy for Helix jobs -->
- <!-- REVIEW: currently don't do any retries
- <MaxRetryCount Condition="'$(MaxRetryCount)' == ''">4</MaxRetryCount>
- -->
- </PropertyGroup>
-
- <!--
- Create all the Helix data to start a set of jobs. This is invoked once for each Scenario (see
- target "RunInParallelForEachScenario"). Create a set of work items, one for each CoreFX test assembly.
- All will have the same Scenario specific command line. Note that this target is listed in the
- InitialTargets for this Project. This causes it to be invoked (and the Helix data created,
- such as the HelixWorkItem item group) before Helix "Test" target is invoked (as a normal target).
- We conditionalize this (and its dependent targets) with "UsesHelixSdk=true" so they aren't invoked
- during the other invocations of this Project, such as when "RunInParallelForEachScenario" is run.
- -->
- <Target Name="BuildHelixWorkItems" DependsOnTargets="GetTestAssetManifest" Condition=" '$(UsesHelixSdk)' == 'true' " >
- <Error Condition=" '$(TimeoutPerTestCollectionInMinutes)' == '' " Text="TimeoutPerTestCollectionInMinutes not set" />
-
- <ItemGroup Condition=" '$(UsesHelixSdk)' == 'true' ">
- <HelixCorrelationPayload Include="$(TestHostRootPath)" />
-
- <HelixWorkItem Include="@(TestAssetBlobInfos -> '%(FileName)')">
- <PayloadUri>$(TestAssetBlobFeedUrl)/%(Identity)</PayloadUri>
- <Command>$(HelixCommand)</Command>
- <Timeout>$([System.TimeSpan]::FromMinutes($(TimeoutPerTestCollectionInMinutes)))</Timeout>
- </HelixWorkItem>
- </ItemGroup>
- </Target>
-
- <Import Sdk="Microsoft.DotNet.Helix.Sdk" Project="Sdk.targets" Condition=" '$(UsesHelixSdk)' == 'true' " />
-
-</Project>
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
new file mode 100644
index 00000000000..63d8d1b1a20
--- /dev/null
+++ b/eng/liveBuilds.targets
@@ -0,0 +1,90 @@
+<Project>
+
+ <PropertyGroup>
+ <CoreCLROSGroup Condition="'$(CoreCLROSGroup)' == ''">$(OSGroup)</CoreCLROSGroup>
+ <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(Configuration)</CoreCLRConfiguration>
+ <LibrariesOSGroup Condition="'$(LibrariesOSGroup)' == ''">$(OSGroup)</LibrariesOSGroup>
+ <LibrariesConfiguration Condition="'$(LibrariesConfiguration)' == ''">$(Configuration)</LibrariesConfiguration>
+ <CoreCLRArtifactsPath Condition="'$(CoreCLRArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'coreclr', '$(CoreCLROSGroup).$(TargetArchitecture).$(CoreCLRConfiguration)'))</CoreCLRArtifactsPath>
+ <LibrariesSharedFrameworkRefArtifactsPath Condition="'$(LibrariesSharedFrameworkRefArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'ref', 'microsoft.netcore.app', '$(LibrariesConfiguration)'))</LibrariesSharedFrameworkRefArtifactsPath>
+ <LibrariesAllRefArtifactsPath Condition="'$(LibrariesAllRefArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'ref', 'netcoreapp'))</LibrariesAllRefArtifactsPath>
+ <LibrariesSharedFrameworkBinArtifactsPath Condition="'$(LibrariesSharedFrameworkBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'pkg', 'netcoreapp', 'runtime', '$(LibrariesOSGroup)-$(LibrariesConfiguration)-$(TargetArchitecture)'))</LibrariesSharedFrameworkBinArtifactsPath>
+ <LibrariesAllBinArtifactsPath Condition="'$(LibrariesAllBinArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'runtime', 'netcoreapp-$(LibrariesOSGroup)-$(LibrariesConfiguration)-$(TargetArchitecture)'))</LibrariesAllBinArtifactsPath>
+ <LibrariesNativeArtifactsPath Condition="'$(LibrariesNativeArtifactsPath)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'native', 'netcoreapp-$(LibrariesOSGroup)-$(LibrariesConfiguration)-$(TargetArchitecture)'))</LibrariesNativeArtifactsPath>
+ <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">x64</CoreCLRCrossTargetComponentDirName>
+ <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsWindows)' == 'true'">x86</CoreCLRCrossTargetComponentDirName>
+ <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsLinux)' == 'true'">x64</CoreCLRCrossTargetComponentDirName>
+ </PropertyGroup>
+
+ <Target Name="ResolveCoreCLRFilesFromLocalBuild">
+ <Error Condition="!Exists('$(CoreCLRArtifactsPath)')" Text="The CoreCLR artifacts path does not exist '$(CoreCLRArtifactsPath)'. The CoreCLR subset category must be built before building this project." />
+
+ <PropertyGroup>
+ <CoreCLRArtifactsPath>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)'))</CoreCLRArtifactsPath>
+ <CoreCLRSharedFrameworkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)','sharedFramework'))</CoreCLRSharedFrameworkDir>
+ <CoreCLRCrossTargetComponentDir
+ Condition="'$(CoreCLRCrossTargetComponentDirName)' != ''">$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)','$(CoreCLRCrossTargetComponentDirName)','sharedFramework'))</CoreCLRCrossTargetComponentDir>
+ </PropertyGroup>
+ <ItemGroup>
+ <CoreCLRFiles Include="$(CoreCLRSharedFrameworkDir)*.*" />
+ <CoreCLRCrossTargetFiles Condition="'$(CoreCLRCrossTargetComponentDir)' != ''" Include="$(CoreCLRCrossTargetComponentDir)*.*" IsNative="true" />
+ <CoreCLRFiles Include="$(CoreCLRArtifactsPath)Redist/**/*.dll" />
+ <CoreCLRFiles>
+ <IsNative>true</IsNative>
+ </CoreCLRFiles>
+ <CoreCLRFiles Include="$(CoreCLRArtifactsPath)System.Private.CoreLib.dll" />
+ <CoreCLRFiles
+ Include="
+ $(CoreCLRSharedFrameworkDir)PDB/*.pdb;
+ $(CoreCLRSharedFrameworkDir)PDB/*.dbg;
+ $(CoreCLRSharedFrameworkDir)PDB/*.dwarf" />
+ <CoreCLRFiles
+ Include="$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.pdb;" />
+ <CoreCLRFiles Condition="Exists('$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.ni.pdb')"
+ Include="$(CoreCLRArtifactsPath)PDB/System.Private.CoreLib.ni.pdb" />
+ <CoreCLRCrossTargetFiles Condition="'$(CoreCLRCrossTargetComponentDir)' != ''"
+ Include="
+ $(CoreCLRCrossTargetComponentDir)PDB/*.pdb;
+ $(CoreCLRCrossTargetComponentDir)PDB/*.dbg;
+ $(CoreCLRCrossTargetComponentDir)PDB/*.dwarf" />
+ </ItemGroup>
+
+ <Error Condition="'@(CoreCLRFiles)' == ''" Text="The CoreCLR subset category must be built before building this project." />
+ </Target>
+
+ <Target Name="ResolveLibrariesFromLocalBuild">
+ <Error Condition="!Exists('$(LibrariesSharedFrameworkRefArtifactsPath)')" Text="The libraries subset category must be built before building this project." />
+ <Error Condition="!Exists('$(LibrariesAllRefArtifactsPath)')" Text="The libraries subset category must be built before building this project." />
+ <Error Condition="!Exists('$(LibrariesSharedFrameworkBinArtifactsPath)')" Text="The libraries subset category must be built before building this project." />
+ <Error Condition="!Exists('$(LibrariesAllBinArtifactsPath)')" Text="The libraries subset category must be built before building this project." />
+ <Error Condition="!Exists('$(LibrariesNativeArtifactsPath)')" Text="The libraries subset category must be built before building this project." />
+ <ItemGroup>
+ <LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' != 'true'" Include="$(LibrariesSharedFrameworkRefArtifactsPath)*.dll;$(LibrariesSharedFrameworkRefArtifactsPath)*.pdb" />
+ <LibrariesRefAssemblies Condition="'$(IncludeOOBLibraries)' == 'true'" Include="$(LibrariesAllRefArtifactsPath)*.dll;$(LibrariesAllRefArtifactsPath)*.pdb" />
+ <LibrariesRuntimeFiles Condition="'$(IncludeOOBLibraries)' != 'true'" Include="
+ $(LibrariesSharedFrameworkBinArtifactsPath)*.dll;
+ $(LibrariesSharedFrameworkBinArtifactsPath)*.pdb"
+ IsNative="" />
+ <LibrariesRuntimeFiles Condition="'$(IncludeOOBLibraries)' == 'true'" Include="
+ $(LibrariesAllBinArtifactsPath)*.dll;
+ $(LibrariesAllBinArtifactsPath)*.pdb"
+ IsNative="" />
+ <LibrariesRuntimeFiles Include="
+ $(LibrariesNativeArtifactsPath)*.dll;
+ $(LibrariesNativeArtifactsPath)*.dylib;
+ $(LibrariesNativeArtifactsPath)*.so;
+ $(LibrariesNativeArtifactsPath)*.dbg;
+ $(LibrariesNativeArtifactsPath)*.dwarf;
+ $(LibrariesNativeArtifactsPath)*.pdb"
+ IsNative="true" />
+ </ItemGroup>
+
+ <Error Condition="'@(LibrariesRefAssemblies)' == ''" Text="The libraries subset category must be built before building this project." />
+ <Error Condition="'@(LibrariesRuntimeFiles)' == ''" Text="The libraries subset category must be built before building this project." />
+ </Target>
+
+ <PropertyGroup>
+ <LiveRuntimeIdentifierGraphPath>$(RuntimeIdGraphDefinitionFile)</LiveRuntimeIdentifierGraphPath>
+ <RuntimeIdentifierGraphPath Condition="'$(UseLiveRuntimeIdentifierGraph)' == 'true'">$(LiveRuntimeIdentifierGraphPath)</RuntimeIdentifierGraphPath>
+ </PropertyGroup>
+</Project>
diff --git a/eng/packaging.props b/eng/packaging.props
index f15dc257c42..a7eb2fa7b04 100644
--- a/eng/packaging.props
+++ b/eng/packaging.props
@@ -3,7 +3,6 @@
<PackageDescriptionFile>$(PkgDir)descriptions.json</PackageDescriptionFile>
<PackageLicenseFile>$(RepoRoot)LICENSE.TXT</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
- <RuntimeIdGraphDefinitionFile>$(PkgDir)Microsoft.NETCore.Platforms/runtime.json</RuntimeIdGraphDefinitionFile>
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
<ProjectUrl Condition="'$(ProjectUrl)' == ''">https://github.com/dotnet/corefx</ProjectUrl>
<Copyright>$(CopyrightNetFoundation)</Copyright>
@@ -30,7 +29,7 @@
<SkipValidatePackageTargetFramework>true</SkipValidatePackageTargetFramework>
<SkipGenerationCheck>true</SkipGenerationCheck>
</PropertyGroup>
-
+
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
<!-- Don't build referenced projects -->
<BuildPackageLibraryReferences>false</BuildPackageLibraryReferences>
diff --git a/eng/pipelines/coreclr/pr.yml b/eng/pipelines/coreclr/pr.yml
index f31456d84a4..0d8691ff7eb 100644
--- a/eng/pipelines/coreclr/pr.yml
+++ b/eng/pipelines/coreclr/pr.yml
@@ -174,6 +174,8 @@ jobs:
- Linux_arm
helixQueueGroup: pr
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
+ jobParameters:
+ liveLibrariesBuildConfig: Release
#
# Release test builds
diff --git a/eng/pipelines/coreclr/templates/build-job.yml b/eng/pipelines/coreclr/templates/build-job.yml
index 1c15f2722f0..2a002786640 100644
--- a/eng/pipelines/coreclr/templates/build-job.yml
+++ b/eng/pipelines/coreclr/templates/build-job.yml
@@ -136,7 +136,7 @@ jobs:
displayName: Build product
# Build native test components
- - script: $(coreClrRepoRootDir)build-test$(scriptExt) skipmanaged $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(clangArg)
+ - script: $(coreClrRepoRootDir)build-test$(scriptExt) skipmanaged $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(clangArg) skipgeneratelayout
displayName: Build native test components
# Sign on Windows
diff --git a/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml b/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
index b90d31ada69..4c032e6c19d 100644
--- a/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
+++ b/eng/pipelines/coreclr/templates/crossgen-comparison-job.yml
@@ -10,6 +10,13 @@ parameters:
variables: {}
pool: ''
+ # When set to a non-empty value (Debug / Release), it determines libraries
+ # build configuration to use for the tests. Setting this property implies
+ # a dependency of this job on the appropriate libraries build and is used
+ # to construct the name of the Azure artifact representing libraries build
+ # to use for building the tests.
+ liveLibrariesBuildConfig: ''
+
### Crossgen-comparison job
###
### Ensure that the output of cross-architecture, e.g. x64-hosted-arm-targeting,
@@ -23,6 +30,7 @@ jobs:
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup }}
stagedBuild: ${{ parameters.stagedBuild }}
+ liveLibrariesBuildConfig: ${{ parameters.liveLibrariesBuildConfig }}
helixType: 'test/crossgen-comparison/'
pool: ${{ parameters.pool }}
@@ -59,7 +67,10 @@ jobs:
- ${{ parameters.variables }}
# Test job depends on the corresponding build job
- dependsOn: ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+ dependsOn:
+ - ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
+ - ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
+ - ${{ format('libraries_build_{0}_{1}{2}_{3}_{4}', 'netcoreapp', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
# Run all steps in the container.
# Note that the containers are defined in platform-matrix.yml
@@ -78,6 +89,16 @@ jobs:
artifactName: '$(buildProductArtifactName)'
displayName: 'product build'
+ # Optionally download live-built libraries
+ - ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
+ - template: /eng/pipelines/common/download-artifact-step.yml
+ parameters:
+ unpackFolder: $(librariesDownloadDir)
+ cleanUnpackFolder: false
+ artifactFileName: '$(librariesBuildArtifactName)$(archiveExtension)'
+ artifactName: '$(librariesBuildArtifactName)'
+ displayName: 'live-built libraries'
+
# Create directories and ensure crossgen is executable
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
diff --git a/eng/pipelines/coreclr/templates/run-test-job.yml b/eng/pipelines/coreclr/templates/run-test-job.yml
index 018733b12d5..a5db125e48e 100644
--- a/eng/pipelines/coreclr/templates/run-test-job.yml
+++ b/eng/pipelines/coreclr/templates/run-test-job.yml
@@ -93,7 +93,7 @@ jobs:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-HelixApi-Access
-
+
- ${{ parameters.variables }}
# TODO: update these numbers as they were determined long ago
@@ -385,4 +385,4 @@ jobs:
pathtoPublish: $(Build.SourcesDirectory)/artifacts/log
artifactName: '$(LogNamePrefix)_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.testGroup }}'
continueOnError: true
- condition: always() \ No newline at end of file
+ condition: always()
diff --git a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml
index e0c1eeaaf19..58a89ddcefc 100644
--- a/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml
+++ b/eng/pipelines/coreclr/templates/xplat-pipeline-job.yml
@@ -41,7 +41,7 @@ jobs:
stagedBuild: ${{ parameters.stagedBuild }}
strategy: ${{ parameters.strategy }}
pool: ${{ parameters.pool }}
-
+
# arcade-specific parameters
condition: ${{ parameters.condition }}
continueOnError: ${{ parameters.continueOnError }}
@@ -50,7 +50,7 @@ jobs:
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
enableMicrobuild: ${{ parameters.enableMicrobuild }}
gatherAssetManifests: ${{ parameters.gatherAssetManifests }}
-
+
variables:
- ${{ if ne(parameters.testGroup, '') }}:
- name: testArtifactRootName
@@ -89,7 +89,7 @@ jobs:
- name: microsoftNetSdkIlFolderPath
value: '$(Build.SourcesDirectory)/.packages/microsoft.net.sdk.il'
-
+
- name: microsoftNetSdkIlArtifactName
value: 'MicrosoftNetSdkIlPackage_${{ parameters.managedTestBuildOsGroup }}${{ parameters.managedTestBuildOsSubgroup }}_$(archType)_$(buildConfig)'
@@ -111,10 +111,7 @@ jobs:
- ${{ if ne(parameters.liveLibrariesBuildConfig, '') }}:
- librariesBuildArtifactName: ${{ format('libraries_bin_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.liveLibrariesBuildConfig) }}
- librariesDownloadDir: $(Build.SourcesDirectory)/artifacts
- - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- - librariesOverrideArg: ' localcorefxpath $(Build.SourcesDirectory) localcorefxconfig ${{ parameters.liveLibrariesBuildConfig }}'
- - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- - librariesOverrideArg: ' localcorefxpath=$(Build.SourcesDirectory) localcorefxconfig=${{ parameters.liveLibrariesBuildConfig }}'
+ - librariesOverrideArg: ' /p:LibrariesConfiguration=${{ parameters.liveLibrariesBuildConfig }}'
- ${{ each variable in parameters.variables }}:
- ${{insert}}: ${{ variable }}
diff --git a/eng/pipelines/installer/azure-pipelines.yml b/eng/pipelines/installer/azure-pipelines.yml
index 8504d0acf46..0f8562c5e80 100644
--- a/eng/pipelines/installer/azure-pipelines.yml
+++ b/eng/pipelines/installer/azure-pipelines.yml
@@ -51,6 +51,15 @@ jobs:
- template: /eng/pipelines/common/checkout-job.yml
#
+# Build CoreCLR and Libraries
+#
+- template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml
+ buildConfig: release
+ platformGroup: all
+
+#
# Build and Test
#
- template: /eng/pipelines/installer/installer-matrix.yml
@@ -61,3 +70,5 @@ jobs:
_BuildConfig: Debug
release:
_BuildConfig: Release
+ liveCoreClrBuildConfig: release
+ liveLibrariesBuildConfig: Release
diff --git a/eng/pipelines/installer/jobs/base-job.yml b/eng/pipelines/installer/jobs/base-job.yml
index 033c518af0e..34ba20e8e4c 100644
--- a/eng/pipelines/installer/jobs/base-job.yml
+++ b/eng/pipelines/installer/jobs/base-job.yml
@@ -44,6 +44,9 @@ jobs:
- name: ${{ variable.key }}
value: ${{ variable.value }}
+ - name: OfficialBuildArg
+ value: ''
+
# Produce test-signed build for PR and Public builds
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: SignType
@@ -53,15 +56,17 @@ jobs:
- ${{ if eq(variables.isOfficialBuild, true) }}:
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]
+ - name: OfficialBuildArg
+ value: /p:OfficialBuildId=$(Build.BuildNumber)
- name: LiveOverridePathArgs
value: >-
- $(CoreCLROverridePathArg)
- $(CoreFXOverridePathArg)
+ $(CoreCLRArtifactsPathArg)
+ $(LibrariesConfigurationArg)
- - name: CoreCLROverridePathArg
+ - name: CoreCLRArtifactsPathArg
value: ''
- - name: CoreFXOverridePathArg
+ - name: LibrariesConfigurationArg
value: ''
- name: CoreClrDownloadPath
@@ -78,8 +83,8 @@ jobs:
parameters.liveCoreClrBuildConfig) }}
- name: CoreClrDownloadPath
value: 'artifacts/transport/coreclr'
- - name: CoreCLROverridePathArg
- value: /p:CoreCLROverridePath=${{ parameters.buildCommandSourcesDirectory }}$(CoreClrDownloadPath)
+ - name: CoreCLRArtifactsPathArg
+ value: /p:CoreCLRArtifactsPath=${{ parameters.buildCommandSourcesDirectory }}$(CoreClrDownloadPath)
- name: CoreClrArtifactName
value: CoreCLRProduct_$(liveCoreClrLegName)
@@ -91,11 +96,11 @@ jobs:
parameters.archType,
parameters.liveLibrariesBuildConfig) }}
- name: LibrariesDownloadPath
- value: 'artifacts/transport/libraries'
- - name: CoreFXOverridePathArg
- value: /p:CoreFXOverridePath=${{ parameters.buildCommandSourcesDirectory }}$(LibrariesDownloadPath)
+ value: 'artifacts'
- name: LibrariesArtifactName
value: libraries_bin_$(liveLibrariesLegName)
+ - name: LibrariesConfigurationArg
+ value: ' /p:LibrariesConfiguration=${{ parameters.liveLibrariesBuildConfig }}'
dependsOn:
- checkout
@@ -152,6 +157,7 @@ jobs:
artifactFileName: '$(LibrariesArtifactName)$(archiveExtension)'
artifactName: '$(LibrariesArtifactName)'
displayName: 'Libraries artifacts'
+ cleanUnpackFolder: false
- ${{ parameters.buildSteps }}
diff --git a/eng/pipelines/installer/jobs/bash-build.yml b/eng/pipelines/installer/jobs/bash-build.yml
index 0812658c97b..c30ed40b2b2 100644
--- a/eng/pipelines/installer/jobs/bash-build.yml
+++ b/eng/pipelines/installer/jobs/bash-build.yml
@@ -55,8 +55,8 @@ jobs:
CommonMSBuildArgs: >-
/p:Configuration=$(_BuildConfig)
- /p:OfficialBuildId=$(Build.BuildNumber)
/p:TargetArchitecture=${{ parameters.archType }}
+ $(OfficialBuildArg)
# Don't put additionalMSBuildArgs as the last line. It may or may not have extra args. If the
# parameter is empty, AzDO replaces it with empty space without chomping the extra newline.
diff --git a/eng/pipelines/installer/jobs/osx-build.yml b/eng/pipelines/installer/jobs/osx-build.yml
index 6c663d36cf5..bff6c67b213 100644
--- a/eng/pipelines/installer/jobs/osx-build.yml
+++ b/eng/pipelines/installer/jobs/osx-build.yml
@@ -17,9 +17,9 @@ jobs:
- script: >-
$(Build.SourcesDirectory)/installer.sh --restore --build --ci --test
- /p:OfficialBuildId=$(Build.BuildNumber)
/p:StripSymbols=true
$(LiveOverridePathArgs)
$(CommonMSBuildArgs)
+ $(OfficialBuildArg)
displayName: Build
condition: succeeded()
diff --git a/eng/pipelines/installer/jobs/windows-build.yml b/eng/pipelines/installer/jobs/windows-build.yml
index 82f1a6310e4..9126eed56cd 100644
--- a/eng/pipelines/installer/jobs/windows-build.yml
+++ b/eng/pipelines/installer/jobs/windows-build.yml
@@ -15,10 +15,10 @@ jobs:
buildVariables:
CommonMSBuildArgs: >-
/p:Configuration=$(_BuildConfig)
- /p:OfficialBuildId=$(Build.BuildNumber)
/p:TargetArchitecture=${{ parameters.archType }}
/p:PortableBuild=true
/p:SkipTests=${{ parameters.skipTests }}
+ $(OfficialBuildArg)
MsbuildSigningArguments: >-
/p:CertificateId=400
/p:DotNetSignType=$(SignType)
diff --git a/eng/pipelines/libraries/base-job.yml b/eng/pipelines/libraries/base-job.yml
index 6f9fc4db1d6..14e30ad1c92 100644
--- a/eng/pipelines/libraries/base-job.yml
+++ b/eng/pipelines/libraries/base-job.yml
@@ -45,10 +45,10 @@ jobs:
- ${{ if ne(parameters.testScope, '') }}:
- _testScopeArg: -testscope ${{ parameters.testScope }}
-
+
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- _runtimeOSArg: /p:RuntimeOS=linux-musl
-
+
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, ''), eq(parameters.archType, 'arm')) }}:
- _runtimeOSArg: /p:RuntimeOS=ubuntu.16.04
@@ -69,12 +69,12 @@ jobs:
- _coreClrArtifactName: ''
- _coreClrDownloadPath: ''
- - _coreClrOverridePathArg: ''
+ - _coreClrArtifactsPathArg: ''
- ${{ if ne(parameters.liveCoreClrBuildConfig, '') }}:
- _coreClrDownloadPath: '$(Build.SourcesDirectory)/artifacts/transport/coreclr'
- _coreClrArtifactName: 'CoreCLRProduct_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.liveCoreClrBuildConfig }}'
- - _coreClrOverridePathArg: ' /p:CoreCLROverridePath=$(_coreClrDownloadPath)'
+ - _coreClrArtifactsPathArg: ' /p:CoreCLRArtifactsPath=$(_coreClrDownloadPath)'
# WebAssembly uses linux implementation detail
- ${{ if eq(parameters.osGroup, 'WebAssembly') }}:
@@ -90,7 +90,7 @@ jobs:
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- _stripSymbolsArg: -stripSymbols
- - _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_stripSymbolsArg) $(_testScopeArg) $(_warnAsErrorArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_coreClrOverridePathArg)
+ - _buildArguments: -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_stripSymbolsArg) $(_testScopeArg) $(_warnAsErrorArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_coreClrArtifactsPathArg)
- ${{ parameters.variables }}
dependsOn:
diff --git a/eng/pipelines/libraries/build-job.yml b/eng/pipelines/libraries/build-job.yml
index 76a615ffad4..ddfa9676fce 100644
--- a/eng/pipelines/libraries/build-job.yml
+++ b/eng/pipelines/libraries/build-job.yml
@@ -112,12 +112,24 @@ jobs:
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/runtime
- task: CopyFiles@2
- displayName: Prepare framework runtime folder to publish
+ displayName: Prepare shared framework ref assemblies to publish
+ inputs:
+ sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/ref/microsoft.netcore.app
+ targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/ref/microsoft.netcore.app
+
+ - task: CopyFiles@2
+ displayName: Prepare shared framework runtime folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/pkg/${{ parameters.framework }}/runtime
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/pkg/${{ parameters.framework }}/runtime
- task: CopyFiles@2
+ displayName: Prepare docs folder to publish
+ inputs:
+ sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/docs
+ targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/docs
+
+ - task: CopyFiles@2
displayName: Prepare native folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/native
@@ -128,13 +140,19 @@ jobs:
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/bin/testhost
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/bin/testhost
-
+
- task: CopyFiles@2
displayName: Prepare artifacts toolset folder to publish
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/toolset
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/toolset
-
+
+ - task: CopyFiles@2
+ displayName: Prepare artifacts packages folder to publish
+ inputs:
+ sourceFolder: $(Build.SourcesDirectory)/artifacts/packages
+ targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages
+
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.ArtifactStagingDirectory)/artifacts
@@ -144,7 +162,7 @@ jobs:
tarCompression: $(tarCompression)
artifactName: $(librariesBuildArtifactName)
displayName: Build Assets
-
+
- ${{ if eq(parameters.runTests, true) }}:
- template: /eng/pipelines/libraries/helix.yml
parameters:
diff --git a/eng/referenceFromRuntime.targets b/eng/referenceFromRuntime.targets
index 327fab8cc47..33af01af354 100644
--- a/eng/referenceFromRuntime.targets
+++ b/eng/referenceFromRuntime.targets
@@ -1,13 +1,6 @@
<Project>
- <Target Name="AddReferenceFromRuntimeForTests"
- BeforeTargets="SetupDefaultReferences"
- Condition="'$(IsTestProject)'=='true' and '@(ReferenceFromRuntime)' != ''">
- <ItemGroup>
- <Reference Include="@(ReferenceFromRuntime->'$(RuntimePath)%(Identity).dll')" />
- </ItemGroup>
- </Target>
-
- <PropertyGroup>
+
+ <PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp')) and '$(TargetFramework)' != '$(NetCoreAppCurrent)'">
<PrepareProjectReferencesDependsOn>
AddRuntimeProjectReference;
$(PrepareProjectReferencesDependsOn);
@@ -24,29 +17,52 @@
<Target Name="AddRuntimeProjectReference"
Condition="'$(IsTestProject)'!='true' and '@(ReferenceFromRuntime)' != ''">
- <Error Condition="('$(IsReferenceAssembly)' != 'true' or '$(AllowReferenceFromRuntime)' == 'true') and '$(RuntimeProjectFile)' == ''" Text="RuntimeProjectFile must be specified when using ReferenceFromRuntime from source projects." />
<Error Condition="'$(IsReferenceAssembly)' == 'true' and '$(AllowReferenceFromRuntime)' != 'true'" Text="ReferenceFromRuntime may not be used from reference assemblies." />
+ <PropertyGroup>
+ <RuntimeProjectFile>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'restore', 'runtime', 'runtime.depproj'))</RuntimeProjectFile>
+ </PropertyGroup>
+
<ItemGroup>
<ProjectReference Include="$(RuntimeProjectFile)">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <OutputItemType>_referencePathFromRuntime</OutputItemType>
+ <OutputItemType>_referencePathFromRestoredRuntime</OutputItemType>
</ProjectReference>
</ItemGroup>
</Target>
+ <Target Name="GetFilesFromCoreCLR" Returns="@(CoreCLRFiles)" DependsOnTargets="ResolveCoreCLRFilesFromLocalBuild" />
+
<Target Name="FilterReferenceFromRuntime"
AfterTargets="ResolveProjectReferences"
- Condition="'$(IsTestProject)'!='true' and '@(ReferenceFromRuntime)' != ''">
+ Condition="'@(ReferenceFromRuntime)' != ''">
+
+ <Error Condition="'$(IsReferenceAssembly)' == 'true' and '$(AllowReferenceFromRuntime)' != 'true'" Text="ReferenceFromRuntime may not be used from reference assemblies." />
+
+ <MSBuild Projects="$(MSBuildProjectFile)" Targets="GetFilesFromCoreCLR" Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
+ <Output TaskParameter="TargetOutputs" ItemName="CoreCLRFiles" />
+ </MSBuild>
+
<ItemGroup>
+ <_referencePathFromRuntime Include="@(CoreCLRFiles)" Private="false" />
+ <_referencePathFromRuntime Include="@(_referencePathFromRestoredRuntime)" Private="false" />
+ <!-- If this is a test project, also use the $(RuntimePath) to find a @(ReferenceFromRuntime) assembly. -->
+ <_referencePathFromRuntime Include="@(ReferenceFromRuntime->'$(RuntimePath)%(Identity).dll')" Condition="'$(IsTestProject)' == 'true'" />
<!-- transform to filename in order to intersect -->
<_referencePathFromRuntimeByFileName Include="@(_referencePathFromRuntime->'%(FileName)')" Condition="'%(_referencePathFromRuntime.Extension)' == '.dll'" >
<ReferencePath>%(Identity)</ReferencePath>
</_referencePathFromRuntimeByFileName>
+ </ItemGroup>
+
+ <RemoveDuplicates Inputs="@(_referencePathFromRuntimeByFileName)">
+ <Output TaskParameter="Filtered" ItemName="_referencePathFromRuntimeByFileNameFiltered" />
+ </RemoveDuplicates>
+
+ <ItemGroup>
<!-- intersect with ReferenceFromRuntime -->
- <_filteredReferencePathFromRuntimeByFileName Include="@(_referencePathFromRuntimeByFileName)"
- Condition="'@(_referencePathFromRuntimeByFileName)' == '@(ReferenceFromRuntime)' and '%(Identity)' != ''">
+ <_filteredReferencePathFromRuntimeByFileName Include="@(_referencePathFromRuntimeByFileNameFiltered)"
+ Condition="'@(_referencePathFromRuntimeByFileNameFiltered)' == '@(ReferenceFromRuntime)' and '%(Identity)' != ''">
<Aliases>@(ReferenceFromRuntime->'%(Aliases)')</Aliases>
</_filteredReferencePathFromRuntimeByFileName>
@@ -57,8 +73,8 @@
<OriginalReferenceFromRuntime>%(Identity)</OriginalReferenceFromRuntime>
</_remainingReferenceFromRuntimeWithNI>
- <_filteredReferencePathFromRuntimeByFileName Include="@(_referencePathFromRuntimeByFileName)"
- Condition="'@(_referencePathFromRuntimeByFileName)' == '@(_remainingReferenceFromRuntimeWithNI)' and '%(Identity)' != ''">
+ <_filteredReferencePathFromRuntimeByFileName Include="@(_referencePathFromRuntimeByFileNameFiltered)"
+ Condition="'@(_referencePathFromRuntimeByFileNameFiltered)' == '@(_remainingReferenceFromRuntimeWithNI)' and '%(Identity)' != ''">
<Aliases>@(_remainingReferenceFromRuntimeWithNI->'%(Aliases)')</Aliases>
</_filteredReferencePathFromRuntimeByFileName>
@@ -66,8 +82,9 @@
<!-- transform back to path -->
<!-- We are adding two items(with and without aliases) for references having Aliases. The major reason behind this to not use the Aliases for all the types in that reference. -->
- <ReferencePath Include="@(_filteredReferencePathFromRuntimeByFileName->'%(ReferencePath)')" />
- <ReferencePath Include="@(_filteredReferencePathFromRuntimeByFileName->'%(ReferencePath)')" Condition="'%(Aliases)' != ''" Aliases="" />
+ <!-- We can't use a Reference item for both since only the first one will be kept. Use ReferencePath for the second reference so it will still be passed to the compiler. -->
+ <Reference Include="@(_filteredReferencePathFromRuntimeByFileName->'%(ReferencePath)')" />
+ <ReferencePath Include="@(_filteredReferencePathFromRuntimeByFileName->'%(ReferencePath)')" Condition="'%(_filteredReferencePathFromRuntimeByFileName.Aliases)' != ''" Aliases="" />
</ItemGroup>
<Error Condition="'@(_missingReferenceFromRuntime)' != ''"
diff --git a/src/coreclr/build-test.cmd b/src/coreclr/build-test.cmd
index ec133de6dba..f123307350c 100644
--- a/src/coreclr/build-test.cmd
+++ b/src/coreclr/build-test.cmd
@@ -59,7 +59,6 @@ set __DoCrossgen2=
set __CopyNativeTestBinaries=0
set __CopyNativeProjectsAfterCombinedTestBuild=true
set __SkipGenerateLayout=0
-set __LocalCoreFXPath=
set __LocalCoreFXConfig=%__BuildType%
set __SkipFXRestoreArg=
set __GenerateLayoutOnly=0
@@ -106,8 +105,6 @@ if /i "%1" == "Exclude" (set __Exclude=%2&set processedArgs=!proce
if /i "%1" == "-priority" (set __Priority=%2&shift&set processedArgs=!processedArgs! %1=%2&shift&goto Arg_Loop)
if /i "%1" == "copynativeonly" (set __CopyNativeTestBinaries=1&set __SkipNative=1&set __CopyNativeProjectsAfterCombinedTestBuild=false&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "skipgeneratelayout" (set __SkipGenerateLayout=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
-if /i "%1" == "localcorefxpath" (set __LocalCoreFXPath=%2&set __SkipFXRestoreArg=/p:__SkipFXRestore=true&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-if /i "%1" == "localcorefxconfig" (set __LocalCoreFXConfig=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "generatelayoutonly" (set __SkipManaged=1&set __SkipNative=1&set __CopyNativeProjectsAfterCombinedTestBuild=false&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "--" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
@@ -239,7 +236,7 @@ if not exist "%VSINSTALLDIR%DIA SDK" goto NoDIA
set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0"
call "%__SourceDir%\pal\tools\gen-buildsys.cmd" "%__ProjectFilesDir%" "%__NativeTestIntermediatesDir%" %__VSVersion% %__BuildArch% !__ExtraCmakeArgs!
-
+
if not !errorlevel! == 0 (
echo %__ErrMsgPrefix%%__MsgPrefix%Error: failed to generate native component build project!
exit /b 1
@@ -478,41 +475,6 @@ xcopy /s /y /i "%CORE_ROOT_STAGE%" "%CORE_ROOT%"
REM =========================================================================================
REM ===
-REM === Create the test host necessary for running CoreFX tests.
-REM === The test host includes a dotnet executable, system libraries and CoreCLR assemblies found in CORE_ROOT.
-REM ===
-REM =========================================================================================
-
-if not "%__LocalCoreFXPath%" == "" goto SkipBuildingCoreFXTestHost
-
-echo %__MsgPrefix%Building CoreFX test host
-
-set __BuildLogRootName=Tests_CoreFX_Testhost
-set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
-set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
-set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
-set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
-set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
-set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
-set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!
-
-powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
- %__ProjectDir%\tests\src\runtest.proj /t:CreateTestHost /nodeReuse:false^
- /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
- /p:UsePartialNGENOptimization=false /maxcpucount^
- !__Logging! %__CommonMSBuildArgs% %RuntimeIdArg% %__PriorityArg% %__UnprocessedBuildArgs%
-if errorlevel 1 (
- echo %__ErrMsgPrefix%%__MsgPrefix%Error: Create Test Host failed. Refer to the build log files for details:
- echo %__BuildLog%
- echo %__BuildWrn%
- echo %__BuildErr%
- exit /b 1
-)
-
-:SkipBuildingCoreFXTestHost
-
-REM =========================================================================================
-REM ===
REM === Create test wrappers.
REM ===
REM =========================================================================================
@@ -574,22 +536,6 @@ if defined __DoCrossgen2 (
rd /s /q "%CORE_ROOT_STAGE%"
-
-REM =========================================================================================
-REM ===
-REM === Copy CoreFX assemblies if needed.
-REM ===
-REM =========================================================================================
-
-if NOT "%__LocalCoreFXPath%"=="" (
- echo Patch CoreFX from %__LocalCoreFXPath% ^(%__LocalCoreFXConfig%^)
- set NEXTCMD=python "%__ProjectDir%\tests\scripts\patch-corefx.py" -clr_core_root "%CORE_ROOT%"^
- -fx_root "%__LocalCoreFXPath%" -arch %__BuildArch% -build_type %__LocalCoreFXConfig%
- echo !NEXTCMD!
- !NEXTCMD!
-)
-
-
REM =========================================================================================
REM ===
REM === All builds complete!
diff --git a/src/coreclr/build-test.sh b/src/coreclr/build-test.sh
index ae0d229cbe1..bda7435fb82 100755
--- a/src/coreclr/build-test.sh
+++ b/src/coreclr/build-test.sh
@@ -132,16 +132,6 @@ generate_layout()
fi
}
-patch_corefx_libraries()
-{
- echo "${__MsgPrefix}Patching CORE_ROOT: '${CORE_ROOT}' with CoreFX libaries from enlistment '${__LocalCoreFXPath} (${__LocalCoreFXConfig})"
-
- patchCoreFXArguments=("-clr_core_root" "${CORE_ROOT}" "-fx_root" "${__LocalCoreFXPath}" "-arch" "${__BuildArch}" "-build_type" "${__LocalCoreFXConfig}")
- scriptPath="$__ProjectDir/tests/scripts"
- echo "python ${scriptPath}/patch-corefx.py ${patchCoreFXArguments[@]}"
- $__Python "${scriptPath}/patch-corefx.py" "${patchCoreFXArguments[@]}"
-}
-
precompile_coreroot_fx()
{
local overlayDir=$CORE_ROOT
@@ -231,22 +221,6 @@ function is_skip_crossgen_test {
return 1
}
-generate_testhost()
-{
- echo "${__MsgPrefix}Generating test host..."
-
- export TEST_HOST=$xUnitTestBinBase/testhost
-
- if [ -d "${TEST_HOST}" ]; then
- rm -rf $TEST_HOST
- fi
-
- mkdir -p $TEST_HOST
-
- build_MSBuild_projects "Tests_Generate_TestHost" "${__ProjectDir}/tests/src/runtest.proj" "Creating test host" "/t:CreateTestHost"
-}
-
-
build_Tests()
{
echo "${__MsgPrefix}Building Tests..."
@@ -371,10 +345,6 @@ build_Tests()
if [ $__SkipGenerateLayout != 1 ]; then
generate_layout
-
- if [ ! -z "$__LocalCoreFXPath" ]; then
- patch_corefx_libraries
- fi
fi
}
@@ -574,10 +544,9 @@ usage_list=("-buildtestwrappersonly - only build the test wrappers.")
usage_list+=("-copynativeonly: Only copy the native test binaries to the managed output. Do not build the native or managed tests.")
usage_list+=("-crossgen - Precompiles the framework managed assemblies in coreroot.")
usage_list+=("-generatelayoutonly - only pull down dependencies and build coreroot.")
-usage_list+=("-generatetesthostonly - only pull down dependencies and build coreroot and the CoreFX testhost.")
usage_list+=("-priority1 - include priority=1 tests in the build.")
usage_list+=("-runtests - run tests after building them.")
-usage_list+=("-skipgeneratelayout: Do not generate the Core_Root layout or the CoreFX testhost.")
+usage_list+=("-skipgeneratelayout: Do not generate the Core_Root layout.")
usage_list+=("-skiprestorepackages - skip package restore.")
# Obtain the location of the bash script to figure out where the root of the repo is.
@@ -630,14 +599,6 @@ handle_arguments() {
__SkipGenerateLayout=1
;;
- localcorefxpath=*|-localcorefxpath=*)
- __LocalCoreFXPath=$(echo "$1" | cut -d'=' -f 2)
- ;;
-
- localcorefxconfig=*|-localcorefxconfig=*)
- __LocalCoreFXConfig=$(echo "$1" | cut -d'=' -f 2)
- ;;
-
*)
__UnprocessedBuildArgs+=("$1")
;;
@@ -684,7 +645,6 @@ __SkipRestore=""
__SkipRestorePackages=0
__SourceDir="$__ProjectDir/src"
__UnprocessedBuildArgs=
-__LocalCoreFXPath=
__LocalCoreFXConfig=${__BuildType}
__UseNinja=0
__VerboseBuild=0
@@ -754,9 +714,6 @@ elif [ ! -z "$__BuildTestWrappersOnly" ]; then
build_test_wrappers
else
generate_layout
- if [ ! -z "$__GenerateTestHostOnly" ]; then
- generate_testhost
- fi
fi
if [ $? -ne 0 ]; then
diff --git a/src/coreclr/coreclr.proj b/src/coreclr/coreclr.proj
index 13218414dff..421e049cebb 100644
--- a/src/coreclr/coreclr.proj
+++ b/src/coreclr/coreclr.proj
@@ -5,12 +5,12 @@
<Target Name="Build">
<ItemGroup>
<_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="-skiptests" />
- <_CoreClrBuildArg Include="-$(Platform)" />
+ <_CoreClrBuildArg Condition="'$(TargetArchitecture)' != ''" Include="-$(TargetArchitecture)" />
<_CoreClrBuildArg Include="-$(Configuration.ToLower())" />
<_CoreClrBuildArg Condition="'$(ContinuousIntegrationBuild)' == 'true'" Include="-ci" />
- <_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and ('$(Platform)' == 'x86' or '$(Platform)' == 'x64') and '$(Configuration)' == 'Release'" Include="-enforcepgo" />
+ <_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'x64') and '$(Configuration)' == 'Release'" Include="-enforcepgo" />
<_CoreClrBuildArg Condition="!$([MSBuild]::IsOsPlatform(Windows)) and '$(Configuration)' == 'Release'" Include="-stripsymbols" />
- <_CoreClrBuildArg Condition="'$(OfficialBuildId)' == ''" Include="-officialbuildid=$(OfficialBuildId)" />
+ <_CoreClrBuildArg Condition="'$(OfficialBuildId)' != ''" Include="-officialbuildid=$(OfficialBuildId)" />
</ItemGroup>
<PropertyGroup>
diff --git a/src/coreclr/src/.nuget/packaging.props b/src/coreclr/src/.nuget/packaging.props
index 6d16a984893..69365bcd15d 100644
--- a/src/coreclr/src/.nuget/packaging.props
+++ b/src/coreclr/src/.nuget/packaging.props
@@ -6,7 +6,6 @@
<PackageLicenseFile>$(CoreclrDir)/LICENSE.TXT</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(CoreclrDir)/THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
- <RuntimeIdGraphDefinitionFile>$(NuGetPackageRoot)/microsoft.netcore.platforms/$(MicrosoftNETCorePlatformsVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
<ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
<ProjectUrl>https://dot.net</ProjectUrl>
diff --git a/src/coreclr/tests/build.proj b/src/coreclr/tests/build.proj
index 448cc55025e..091430dc951 100644
--- a/src/coreclr/tests/build.proj
+++ b/src/coreclr/tests/build.proj
@@ -22,7 +22,6 @@
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_dependencies\test_dependencies.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\test_runtime\test_runtime.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\CoreCLRTestLibrary\CoreCLRTestLibrary.csproj" />
- <RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\CoreFX\CoreFX.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)external\external.csproj" />
<RestoreProjects Include="$(MSBuildThisFileDirectory)src\Common\ilasm\ilasm.ilproj" />
</ItemGroup>
diff --git a/src/coreclr/tests/scripts/patch-corefx.py b/src/coreclr/tests/scripts/patch-corefx.py
deleted file mode 100755
index 54dd929892e..00000000000
--- a/src/coreclr/tests/scripts/patch-corefx.py
+++ /dev/null
@@ -1,263 +0,0 @@
-#!/usr/bin/env python
-#
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-# See the LICENSE file in the project root for more information.
-#
-##########################################################################
-##########################################################################
-#
-# Module: patch-corefx.py
-#
-# Notes:
-#
-# Script to overwrite the nuget downloaded corefx libraries with ones
-# built from a local enlistment.
-#
-##########################################################################
-##########################################################################
-
-import argparse
-import distutils.dir_util
-import os
-import re
-import shutil
-import subprocess
-import sys
-
-##########################################################################
-# Globals
-##########################################################################
-
-testing = False
-
-# This should be factored out of build.sh
-Unix_name_map = {
- 'Linux': 'Linux',
- 'Darwin': 'OSX',
- 'FreeBSD': 'FreeBSD',
- 'OpenBSD': 'OpenBSD',
- 'NetBSD': 'NetBSD',
- 'SunOS': 'SunOS'
-}
-
-Is_windows = (os.name == 'nt')
-
-##########################################################################
-# Delete protocol
-##########################################################################
-
-def del_rw(action, name, exc):
- os.chmod(name, 0o651)
- os.remove(name)
-
-##########################################################################
-# Argument Parser
-##########################################################################
-
-description = 'Tool to patch CoreFx tests on the CoreCLR repo'
-
-parser = argparse.ArgumentParser(description=description)
-
-parser.add_argument('-arch', dest='arch', default='x64')
-parser.add_argument('-build_type', dest='build_type', default='Debug')
-parser.add_argument('-clr_core_root', dest='clr_core_root', default=None)
-parser.add_argument('-fx_root', dest='fx_root', default=None)
-
-
-##########################################################################
-# Helper Functions
-##########################################################################
-
-def validate_args(args):
- """ Validate all of the arguments parsed.
- Args:
- args (argparser.ArgumentParser): Args parsed by the argument parser.
- Returns:
- (arch, build_type, clr_core_root, fx_root,)
- (str, str, str, str)
- Notes:
- If the arguments are valid then return them all in a tuple. If not, raise
- an exception stating x argument is incorrect.
- """
-
- arch = args.arch
- build_type = args.build_type
- clr_core_root = args.clr_core_root
- fx_root = args.fx_root
-
- def validate_arg(arg, check):
- """ Validate an individual arg
- Args:
- arg (str|bool): argument to be validated
- check (lambda: x-> bool): test that returns either True or False
- : based on whether the check passes.
-
- Returns:
- is_valid (bool): Is the argument valid?
- """
-
- helper = lambda item: item is not None and check(item)
-
- if not helper(arg):
- raise Exception('Argument: %s is not valid.' % (arg))
-
- valid_archs = ['x86', 'x64', 'arm', 'arm64']
- valid_build_types = ['Debug', 'Checked', 'Release']
-
- arch = next((a for a in valid_archs if a.lower() == arch.lower()), arch)
- build_type = next((b for b in valid_build_types if b.lower() == build_type.lower()), build_type)
-
- validate_arg(arch, lambda item: item in valid_archs)
- validate_arg(build_type, lambda item: item in valid_build_types)
-
- if clr_core_root is None:
- raise Exception('No clr_core_root argument provided')
- else:
- clr_core_root = os.path.normpath(clr_core_root)
- validate_arg(clr_core_root, lambda item: os.path.isdir(clr_core_root))
-
- if fx_root is None:
- raise Exception('No fx_root argument provided')
- else:
- fx_root = os.path.normpath(fx_root)
-
- args = (arch, build_type, clr_core_root, fx_root)
-
- log('Configuration:')
- log(' arch: %s' % arch)
- log(' build_type: %s' % build_type)
- log(' clr_core_root: %s' % clr_core_root)
- log(' fx_root: %s' % fx_root)
-
- return args
-
-def log(message):
- """ Print logging information
- Args:
- message (str): message to be printed
- """
-
- print('[%s]: %s' % (sys.argv[0], message))
-
-def test_log(message):
- """ Print logging information only if testing mode is enabled
- Args:
- message (str): message to be printed
- """
- if testing:
- print('[%s]: %s' % (sys.argv[0], message))
-
-def copy_files(source_dir, target_dir):
- """ Copy any files in the source_dir to the target_dir.
- The copy is not recursive.
- The directories must already exist.
- Args:
- source_dir (str): source directory path
- target_dir (str): target directory path
- Returns:
- Nothing
- """
-
- global testing
- assert os.path.isdir(source_dir)
- assert testing or os.path.isdir(target_dir)
-
- for source_filename in os.listdir(source_dir):
- source_pathname = os.path.join(source_dir, source_filename)
- if os.path.isfile(source_pathname):
- target_pathname = os.path.join(target_dir, source_filename)
- log('Copy: %s => %s' % (source_pathname, target_pathname))
- if not testing:
- shutil.copy2(source_pathname, target_pathname)
-
-def patch_coreclr_root(core_root, fx_bin):
- """ Walk through the fx bin and patch corefx dlls to the core root.
- Args:
- core_root (str): the core root path
- fx_bin (str): the runtime folder from a corefx build
- Returns:
- nothing
- """
- test_log('Patching coreclr core_root')
-
- forbidden_names = ['coreclr.dll',
- 'system.private.corelib.dll',
- 'r2rdump.dll',
- 'runincontext.dll',
- 'mscordaccore.dll',
- 'linuxnonjit.dll',
- 'protononjit.dll',
- 'mscordbi.dll',
- 'clrjit.dll',
- 'dbgshim.dll',
- 'coreshim.dll',
- 'clrgc.dll',
- 'superpmi-shim-counter.dll',
- 'clretwrc.dll',
- 'superpmi-shim-collector.dll',
- 'superpmi-shim-simple.dll',
- 'jitinterface.dll',
- 'mscorrc.debug.dll',
- 'mscorrc.dll',
- 'sos.dll']
-
- test_log('forbidden_names = %s' % forbidden_names)
-
- for file in os.listdir(fx_bin):
- test_log('considering file %s' % file)
-
- filename = os.path.basename(file)
- comparename = filename.lower()
- if ( comparename.endswith('.dll') and
- comparename not in forbidden_names and
- not comparename.startswith('api-ms-core') ):
- source_pathname = os.path.join(fx_bin, filename)
- target_pathname = os.path.join(core_root, filename)
-
- test_log ('copying file %s to file %s' % (source_pathname, target_pathname))
-
- shutil.copy2(source_pathname, target_pathname)
-
-##########################################################################
-# Main
-##########################################################################
-
-def main(args):
- """
- The way this script decides what to patch is by looking at the core
- root for a list of dlls, then filtering out any ones built by coreclr.
- This leaves us with a list of non-coreclr build dlls. Now we can use
- that list to go through the corefx repo and any ones that also exist
- in the corefx bin folder are copied over.
- """
-
- log('Patching CoreFX binaries from local enlistment.')
-
- arch, build_type, clr_core_root, fx_root = validate_args(args)
-
- clr_os = 'Windows_NT' if Is_windows else Unix_name_map[os.uname()[0]]
-
- if not os.path.exists(clr_core_root):
- raise Exception('Core root path %s does not exist.' % (clr_core_root))
-
- fx_bin = os.path.join(fx_root,
- 'artifacts',
- 'bin',
- 'runtime',
- 'netcoreapp-%s-%s-%s' % (clr_os, build_type, arch))
-
- if not os.path.exists(fx_bin):
- raise Exception('CoreFX bin path %s does not exist.' % (fx_bin))
-
- patch_coreclr_root(clr_core_root, fx_bin)
-
-
-##########################################################################
-# setup for Main
-##########################################################################
-
-if __name__ == '__main__':
- Args = parser.parse_args(sys.argv[1:])
-
- main(Args)
diff --git a/src/coreclr/tests/src/Common/CoreFX/CoreFX.csproj b/src/coreclr/tests/src/Common/CoreFX/CoreFX.csproj
deleted file mode 100644
index 36dccb97ada..00000000000
--- a/src/coreclr/tests/src/Common/CoreFX/CoreFX.csproj
+++ /dev/null
@@ -1,150 +0,0 @@
-<Project>
-
- <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
- <PropertyGroup>
- <RestoreOutputPath>$(SourceDir)Common\CoreFX\obj</RestoreOutputPath>
- <Language>C#</Language>
- <TargetFramework>netcoreapp3.0</TargetFramework>
- <CLRTestKind>SharedLibrary</CLRTestKind>
- <IsTestProject>false</IsTestProject>
- <MicrosoftDiagnosticsRuntimePackageVersion>1.0.5</MicrosoftDiagnosticsRuntimePackageVersion>
- <OutputType>Library</OutputType>
- <SelfContained>true</SelfContained>
- <ProjectDepsFileName>Microsoft.NETCore.App.deps.json</ProjectDepsFileName>
- <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
- <IncludeMainProjectInDepsFile>false</IncludeMainProjectInDepsFile>
- <NuGetTargetMoniker>.NETCoreApp,Version=v3.0</NuGetTargetMoniker>
- <NuGetTargetMonikerShort>netcoreapp3.0</NuGetTargetMonikerShort>
- <GenerateDependencyFile>true</GenerateDependencyFile>
- <RuntimeFrameworkVersion>$(MicrosoftNETCoreAppVersion)</RuntimeFrameworkVersion>
- </PropertyGroup>
-
- <!-- Switch RuntimeIdentifier according to currently targeted OSGroup -->
- <PropertyGroup>
- <RuntimeIdentifier Condition="'$(OSGroup)' == 'Windows_NT'">win-$(Platform)</RuntimeIdentifier>
- <RuntimeIdentifier Condition="'$(OSGroup)' == 'Linux'">linux-$(Platform)</RuntimeIdentifier>
- <RuntimeIdentifier Condition="'$(OSGroup)' == 'OSX'">osx-$(Platform)</RuntimeIdentifier>
- </PropertyGroup>
-
- <ItemGroup>
- <!-- Microsoft.Private.CoreFx.OOB is a meta-package that contains references to most of what we need -->
- <PackageReference Include="Microsoft.Private.CoreFx.OOB" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
-
- <!-- dotnet.exe -->
- <PackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(MicrosoftNETCoreAppVersion)" />
-
- <!-- hostfxr.dll -->
- <PackageReference Include="Microsoft.NETCore.DotNetHostResolver" Version="$(MicrosoftNETCoreAppVersion)" />
-
- <!-- hostpolicy.dll -->
- <PackageReference Include="Microsoft.NETCore.DotNetHostPolicy" Version="$(MicrosoftNETCoreAppVersion)" />
-
- <KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
- <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
- <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WindowsForms" />
- <KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
- </ItemGroup>
-
- <!-- Target SetupTestingHost needs to run after "AfterResolveReferences" so @(ReferenceCopyLocalPaths) is
- set up, and before "BeforeCompile" because @(ReferenceCopyLocalPaths) is cleared out during the
- compile phase.
- -->
-
- <Target Name="SetupTestingHost" DependsOnTargets="ResolveAssemblyReferences">
-
- <MSBuild Projects="$(MSBuildProjectFile)"
- Targets="Publish"
- Properties="RuntimeIdentifier=$(RuntimeIdentifier);PublishDir=$(NETCoreAppTestSharedFrameworkPath)" />
-
- <Error Condition="'$(CORE_ROOT)' == ''"
- Text="CORE_ROOT variable is not set." />
-
- <PropertyGroup Condition="'$(OSGroup)'=='Windows_NT'">
- <HostFxrFileName>hostfxr</HostFxrFileName>
- <HostFxrFileExtension>dll</HostFxrFileExtension>
- <DotnetExecutableName>dotnet.exe</DotnetExecutableName>
- <HostPolicyFileName>hostpolicy</HostPolicyFileName>
- <HostPolicyExtension>dll</HostPolicyExtension>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(OSGroup)'!='Windows_NT'">
- <HostFxrFileName>libhostfxr</HostFxrFileName>
- <HostFxrFileExtension Condition="'$(OSGroup)' == 'Linux' Or '$(OSGroup)' == 'FreeBSD'">so</HostFxrFileExtension>
- <HostFxrFileExtension Condition="$(OSGroup) =='OSX'">dylib</HostFxrFileExtension>
- <HostPolicyFileName>libhostpolicy</HostPolicyFileName>
- <HostPolicyExtension>$(HostFxrFileExtension)</HostPolicyExtension>
- <DotnetExecutableName>dotnet</DotnetExecutableName>
- </PropertyGroup>
-
- <ItemGroup>
- <!-- Workaround for packages on which Microsoft.NetCoreApp expresses a dependency
- The <PackageToInclude> element doesn't allow a version to be specified and we end up with clashing assembly versions in Core_Root
- -->
- <!--
- <NetCoreAppPackagedAssemblies Include="System.Text.Encoding.CodePages.dll"/>
- -->
-
- <!-- Use xunit dependencies defined in CoreFX.depproj instead of conflicting versions from test dependencies. -->
- <TestDependenciesToExclude Include="$(CORE_ROOT)\**\xunit*"/>
-
- <!-- Exclude subdirectories that contain cross-architecture (possibly cross-bitness) crossgen/JIT -->
- <TestDependenciesToExclude Include="$(CORE_ROOT)\**\x64\*"/>
-
- <!-- Don't include all the nuget files -->
- <TestDependenciesToExclude Include="$(CORE_ROOT)\.nuget\**\*"/>
-
- <!-- Don't include internal crossgen2 dependencies -->
- <TestDependenciesToExclude Include="$(CORE_ROOT)\crossgen2\**\*"/>
-
- <CoreCLRBinariesToExclude Include="@(NetCoreAppPackagedAssemblies);@(TestDependenciesToExclude -> '%(Identity)')" />
- </ItemGroup>
-
- <ItemGroup>
- <!-- REVIEW: do we need to copy recursively (and flatten the structure into a single destination folder)? Can we just copy
- the top level? Or, should we preserve the hierarchy?
- -->
- <CoreCLRBinaries Include="$(CORE_ROOT)\**\*.*" Exclude="$(CORE_ROOT)\**\@(CoreCLRBinariesToExclude -> '%(Identity)' )" />
- </ItemGroup>
-
- <ItemGroup>
- <HostFxFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == '$(HostFxrFileName)'" />
- <DotnetExe Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == 'dotnet'" />
- <HostPolicyFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Filename)' == '$(HostPolicyFileName)'" />
- </ItemGroup>
-
- <Copy SourceFiles="@(HostFxFile)"
- DestinationFolder="$(NETCoreAppTestHostFxrPath)"
- SkipUnchangedFiles="true"
- UseHardlinksIfPossible="true" />
-
- <Copy SourceFiles="@(HostPolicyFile)"
- DestinationFolder="$(NETCoreAppTestSharedFrameworkPath)"
- SkipUnchangedFiles="true"
- UseHardlinksIfPossible="true" />
-
- <Copy SourceFiles="@(DotnetExe)"
- DestinationFolder="$(TestHostRootPath)"
- SkipUnchangedFiles="true"
- UseHardlinksIfPossible="true" />
-
- <Copy SourceFiles="@(CoreCLRBinaries)"
- DestinationFolder="$(NETCoreAppTestSharedFrameworkPath)"
- SkipUnchangedFiles="true" />
-
- <Exec Command="chmod +x $(TestHostRootPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(OSGroup)' != 'Windows_NT'"/>
- </Target>
-
- <PropertyGroup>
- <ProjectAssetsFile>$(SourceDir)Common\CoreFX\obj\project.assets.json</ProjectAssetsFile>
- </PropertyGroup>
-
- <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-
- <Target Name="CoreCompile">
- <ItemGroup>
- <IntermediateAssembly Remove="@(IntermediateAssembly)" />
- </ItemGroup>
- </Target>
-
-</Project>
diff --git a/src/coreclr/tests/src/Common/Directory.Build.targets b/src/coreclr/tests/src/Common/Directory.Build.targets
index fae63241b06..43424eab03d 100644
--- a/src/coreclr/tests/src/Common/Directory.Build.targets
+++ b/src/coreclr/tests/src/Common/Directory.Build.targets
@@ -16,20 +16,20 @@
DependsOnTargets="ResolveAssemblyReferences">
<ItemGroup>
- <RunTimeDependecyExclude Include="$(CORE_ROOT)\**\*.*" />
- <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
- <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
- <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
+ <RunTimeDependencyExclude Include="$(CORE_ROOT)\**\*.*" />
+ <RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName)%(Extension)')" />
+ <RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName).ni%(Extension)')" />
+ <RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName).pdb')" />
<AllResolvedRuntimeDependencies Include="@(RuntimeCopyLocalItems -> '%(FileName)%(Extension)');@(NativeCopyLocalItems -> '%(FileName)%(Extension)')">
<File>%(Identity)</File>
</AllResolvedRuntimeDependencies>
- <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)" Exclude="@(RunTimeDependecyExcludeFiles)"/>
- <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')" />
- <RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
+ <RunTimeDependencyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)" Exclude="@(RunTimeDependencyExcludeFiles)"/>
+ <RunTimeDependencyCopyLocal Include="@(RunTimeDependencyCopyLocalFile -> '%(File)')" />
+ <RunTimeDependencyCopyLocal Include="$(TargetingPackPath)/*" />
</ItemGroup>
<Copy
- SourceFiles="@(RunTimeDependecyCopyLocal)"
+ SourceFiles="@(RunTimeDependencyCopyLocal)"
DestinationFolder="$(CORE_ROOT)"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
diff --git a/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj b/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj
index f3caa0e8ec5..864e1322e1c 100644
--- a/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj
+++ b/src/coreclr/tests/src/Common/test_dependencies/test_dependencies.csproj
@@ -6,15 +6,10 @@
<DisableRarCache>true</DisableRarCache>
<DisablePackageAssetsCache>true</DisablePackageAssetsCache>
<RuntimeIdentifiers>win-arm;win-arm64;win-x64;win-x86;$(TargetRid)</RuntimeIdentifiers>
+ <TargetArchitecture>$(BuildArch)</TargetArchitecture>
+ <IncludeOOBLibraries>true</IncludeOOBLibraries>
+ <LibrariesConfiguration>Release</LibrariesConfiguration>
</PropertyGroup>
- <ItemGroup Condition="'$(__SkipFXRestore)' != 'true'" >
- <PackageReference Include="Microsoft.Private.CoreFx.NETCoreApp" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)"/>
- <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
- <PackageReference Include="System.Security.Permissions" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
- <PackageReference Include="System.Diagnostics.EventLog" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
- <PackageReference Include="System.Drawing.Common" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
- <PackageReference Include="System.Runtime.Intrinsics.Experimental" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
- </ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Diagnostics.Tools.RuntimeClient" Version="$(MicrosoftDiagnosticsToolsRuntimeClientVersion)" />
</ItemGroup>
@@ -24,4 +19,11 @@
<ProjectAssetsFile>$(SourceDir)Common\test_dependencies\obj\project.assets.json</ProjectAssetsFile>
</PropertyGroup>
+ <Import Project="$(RepositoryEngineeringDir)liveBuilds.targets" />
+
+ <Target Name="AddLibrariesToCoreRoot" BeforeTargets="CopyDependencyToCoreRoot" DependsOnTargets="ResolveLibrariesFromLocalBuild">
+ <ItemGroup>
+ <RuntimeCopyLocalItems Include="@(LibrariesRuntimeFiles)" />
+ </ItemGroup>
+ </Target>
</Project>
diff --git a/src/coreclr/tests/src/Common/test_runtime/test_runtime.csproj b/src/coreclr/tests/src/Common/test_runtime/test_runtime.csproj
index a09ddaae79f..e52382ea351 100644
--- a/src/coreclr/tests/src/Common/test_runtime/test_runtime.csproj
+++ b/src/coreclr/tests/src/Common/test_runtime/test_runtime.csproj
@@ -8,15 +8,20 @@
<NoWarn>$(NoWarn);NU1603</NoWarn>
<NoWarn>$(NoWarn);NU1701</NoWarn>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
+ <UseLiveRuntimeIdentifierGraph>true</UseLiveRuntimeIdentifierGraph>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsVersion)" NoWarn="NU1701" />
- <PackageReference Include="Microsoft.DotNet.CoreCLR.TestDependencies" Version="1.0.0-prerelease" NoWarn="NU1701" />
<PackageReference Include="jit-dasm" Version="0.0.1.4" NoWarn="NU1701" />
<PackageReference Include="cijobs" Version="0.0.1.2" NoWarn="NU1701" />
<PackageReference Include="jit-analyze" Version="0.0.1.1" NoWarn="NU1701" />
</ItemGroup>
+ <Target Name="AddUcrtFilesToCoreRoot" BeforeTargets="CopyDependencyToCoreRoot" Condition="'$(BuildOS)' == 'Windows_NT'">
+ <ItemGroup>
+ <NativeCopyLocalItems Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" />
+ </ItemGroup>
+ </Target>
+
<Target Name="Build" DependsOnTargets="$(TraversalBuildDependsOn)" />
<PropertyGroup>
diff --git a/src/coreclr/tests/src/Directory.Build.targets b/src/coreclr/tests/src/Directory.Build.targets
index 275d70b85fd..920348b6cb0 100644
--- a/src/coreclr/tests/src/Directory.Build.targets
+++ b/src/coreclr/tests/src/Directory.Build.targets
@@ -44,8 +44,8 @@
</PropertyGroup>
</When>
</Choose>
-
- <PropertyGroup>
+
+ <PropertyGroup>
<_CLRTestNeedsProjectToRun>false</_CLRTestNeedsProjectToRun>
<_CLRTestNeedsProjectToRun Condition=" '$(_CLRTestNeedsToRun)' and '!$(_CLRTestBuildsExecutable)' ">true</_CLRTestNeedsProjectToRun>
</PropertyGroup>
@@ -80,10 +80,10 @@
<_CopyNativeProjectBinaries Condition="'$(_WillCLRTestProjectBuild)' != 'true'">false</_CopyNativeProjectBinaries>
<_CopyNativeProjectBinaries Condition="'$(_CopyNativeProjectBinaries)' == ''">true</_CopyNativeProjectBinaries>
</PropertyGroup>
-
+
<!-- if we have determined that there is nothing to build, overwrite the build targets so that nothing happens -->
<Import Project="nobuild.targets" Condition="'$(_WillCLRTestProjectBuild)' == 'false'" />
-
+
<!-- RunOnly projects have a special build for dependent projects -->
<Import Project="runonly.targets" Condition="'$(CLRTestKind)' == 'RunOnly'" />
@@ -105,7 +105,7 @@
</PropertyGroup>
<Import Project="CLRTest.Execute.targets" />
- <Target Name="CreateExecuteScript"
+ <Target Name="CreateExecuteScript"
AfterTargets="Build"
Condition="'$(GenerateRunScript)' != 'false' And ('$(_WillCLRTestProjectBuild)' == 'true')"
DependsOnTargets="GenerateExecutionScriptsInternal" />
@@ -199,6 +199,12 @@
<Target Name="UpdateReferenceItems"
BeforeTargets="BeforeResolveReferences"
>
+ <MSBuild Projects="$(MSBuildProjectFullPath)"
+ Targets="GetLiveRefAssemblies"
+ Condition="'$(ReferenceSystemPrivateCoreLib)' != 'true'">
+ <Output TaskParameter="TargetOutputs" ItemName="Reference" />
+ </MSBuild>
+
<ItemGroup>
<Reference Include="$(TargetingPackPath)/*.dll" >
<Private>false</Private>
@@ -207,6 +213,13 @@
</Target>
+ <Target Name="GetLiveRefAssemblies" Returns="@(LibrariesRefAssembliesDlls)"
+ DependsOnTargets="ResolveLibrariesFromLocalBuild">
+ <ItemGroup>
+ <LibrariesRefAssembliesDlls Include="@(LibrariesRefAssemblies)" Condition="'%(Extension)' == '.dll'" Private="false" />
+ </ItemGroup>
+ </Target>
+
<Target Name="AfterBuild">
<Copy SourceFiles="$(AssemblyName).reflect.xml"
DestinationFolder="$(OutputPath)"
@@ -221,9 +234,17 @@
<ProjectAssetsFile></ProjectAssetsFile>
</PropertyGroup>
- <PropertyGroup Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true' and '$(UsingMicrosoftNETSdk)' == 'true'">
+ <PropertyGroup>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
+ <PropertyGroup>
+ <IncludeOOBLibraries>true</IncludeOOBLibraries>
+ <TargetArchitecture>$(BuildArch)</TargetArchitecture>
+ <LibrariesConfiguration>Release</LibrariesConfiguration>
+ </PropertyGroup>
+
+ <Import Project="$(RepositoryEngineeringDir)liveBuilds.targets"/>
+
<Import Project="../../clr.featuredefines.props" />
</Project>
diff --git a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj
index c8ac76c7ac1..0c7d448ed4f 100644
--- a/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj
+++ b/src/coreclr/tests/src/Interop/COM/NETClients/Primitives/NETClientPrimitives.csproj
@@ -24,8 +24,5 @@
<ItemGroup>
<ProjectReference Include="../../NativeServer/CMakeLists.txt" />
<ProjectReference Include="$(SourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
- <PackageReference Include="System.Drawing.Common">
- <Version>$(MicrosoftPrivateCoreFxNETCoreAppVersion)</Version>
- </PackageReference>
</ItemGroup>
</Project>
diff --git a/src/coreclr/tests/src/dirs.proj b/src/coreclr/tests/src/dirs.proj
index 36961b47130..b6dfdfa8f5f 100644
--- a/src/coreclr/tests/src/dirs.proj
+++ b/src/coreclr/tests/src/dirs.proj
@@ -16,7 +16,6 @@
<DisabledProjects Include="Loader\classloader\generics\regressions\DD117522\Test.csproj" />
<DisabledProjects Include="Loader\classloader\generics\GenericMethods\VSW491668.csproj" /> <!-- issue 5501 -->
<DisabledProjects Include="reflection\GenericAttribute\GenericAttributeTests.csproj" />
- <DisabledProjects Include="Common\CoreFX\CoreFX.csproj" />
<DisabledProjects Include="Common\ilasm\ilasm.ilproj" />
</ItemGroup>
diff --git a/src/coreclr/tests/src/runtest.proj b/src/coreclr/tests/src/runtest.proj
index 9e578fc1156..9488cc0e7f2 100644
--- a/src/coreclr/tests/src/runtest.proj
+++ b/src/coreclr/tests/src/runtest.proj
@@ -366,16 +366,6 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
Properties="Language=C#;TargetRid=$(TargetRid);RuntimeIdentifier=$(TargetRid)" />
</Target>
- <!--
- Targets and properties for creating the testhost directory used to run corefx tests.
- -->
-
- <Target Name="CreateTestHost">
- <MSBuild Projects="$(MSBuildThisFileDirectory)Common\CoreFX\CoreFX.csproj"
- Targets="SetupTestingHost"
- Properties="OutputPath=$(NETCoreAppTestSharedFrameworkPath)" />
- </Target>
-
<Target Name="Build">
<!-- generate project.lock.json file corresponding to above json file -->
@@ -394,10 +384,6 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
Targets="CreateTestOverlay"
Condition=" '$(GenerateRuntimeLayout)'=='true' "/>
- <MSBuild Projects="$(MSBuildProjectFile)"
- Targets="CreateTestHost"
- Condition=" '$(GenerateTestHost)'=='true' "/>
-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="RunTests"
Condition=" '$(RunTests)'=='true' "/>
</Target>
diff --git a/src/installer/Directory.Build.props b/src/installer/Directory.Build.props
index 0fb04e36e88..9670824f2a1 100644
--- a/src/installer/Directory.Build.props
+++ b/src/installer/Directory.Build.props
@@ -45,7 +45,6 @@
</PropertyGroup>
<PropertyGroup>
- <BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</TargetArchitecture>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<Platform Condition="'$(Platform)'==''">$(TargetArchitecture)</Platform>
@@ -351,7 +350,7 @@
<PropertyGroup>
<LibPrefix Condition="'$(OSGroup)' != 'Windows_NT'">lib</LibPrefix>
- <LibSuffix>.so</LibSuffix>
+ <LibSuffix>.so</LibSuffix>
<LibSuffix Condition="'$(OSGroup)' == 'Windows_NT'">.dll</LibSuffix>
<LibSuffix Condition="'$(OSGroup)' == 'OSX'">.dylib</LibSuffix>
<StaticLibPrefix>lib</StaticLibPrefix>
diff --git a/src/installer/Directory.Build.targets b/src/installer/Directory.Build.targets
index 724a3f5557e..3d45d9ee49c 100644
--- a/src/installer/Directory.Build.targets
+++ b/src/installer/Directory.Build.targets
@@ -11,6 +11,13 @@
<Import Project="$(RepositoryEngineeringDir)DisableSourceControlManagement.targets" Condition="'$(EnableSourceLink)' == 'false'" />
+ <!-- Define properties based on live-live information for locating packages. -->
+ <PropertyGroup>
+ <LibrariesPackagesDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'packages', '$(LibrariesConfiguration)'))</LibrariesPackagesDir>
+ <LibrariesShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesPackagesDir)', 'Shipping'))</LibrariesShippingPackagesDir>
+ <LibrariesNonShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesPackagesDir)', 'NonShipping'))</LibrariesNonShippingPackagesDir>
+ </PropertyGroup>
+
<!-- Provide default targets which can be hooked onto or overridden as necessary -->
<Target Name="Pack" />
@@ -128,12 +135,12 @@
<PropertyGroup Condition="'$(InstallerExtension)' == '.rpm'">
<HostPackageVersion Condition="'$(UseShippedHostPackage)' != 'true'">$(ProductionVersion)</HostPackageVersion>
-
+
<HostPackageRelease Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">0.1.$(VersionSuffix)</HostPackageRelease>
<HostPackageRelease>$([System.String]::Copy('$(HostPackageRelease)').Replace('-', '_'))</HostPackageRelease>
-
+
<HostResolverPackageVersion Condition="'$(UseShippedHostResolverPackage)' != 'true'">$(ProductionVersion)</HostResolverPackageVersion>
-
+
<HostResolverPackageRelease Condition="'$(IncludePreReleaseLabelInPackageVersion)' == 'true'">0.1.$(VersionSuffix)</HostResolverPackageRelease>
<HostResolverPackageRelease>$([System.String]::Copy('$(HostResolverPackageRelease)').Replace('-', '_'))</HostResolverPackageRelease>
diff --git a/src/installer/pkg/Directory.Build.targets b/src/installer/pkg/Directory.Build.targets
index cbe076d1e7f..d457972bfd7 100644
--- a/src/installer/pkg/Directory.Build.targets
+++ b/src/installer/pkg/Directory.Build.targets
@@ -1,10 +1,6 @@
<Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets" />
- <PropertyGroup>
- <RuntimeIdGraphDefinitionFile>$(NuGetPackageRoot)$(PlatformPackageId.ToLowerInvariant())\$(MicrosoftNETCorePlatformsVersion)\runtime.json</RuntimeIdGraphDefinitionFile>
- </PropertyGroup>
-
<!--
Get branding names for the installers.
-->
diff --git a/src/installer/pkg/deps/deps.csproj b/src/installer/pkg/deps/deps.csproj
deleted file mode 100644
index f105b8f3826..00000000000
--- a/src/installer/pkg/deps/deps.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>netstandard1.0</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="$(MicrosoftNETCorePlatformsPackage)" Version="$(MicrosoftNETCorePlatformsVersion)" />
- </ItemGroup>
-
-</Project>
diff --git a/src/installer/pkg/projects/Directory.Build.targets b/src/installer/pkg/projects/Directory.Build.targets
index b40cddb9dfd..f8ca05a3026 100644
--- a/src/installer/pkg/projects/Directory.Build.targets
+++ b/src/installer/pkg/projects/Directory.Build.targets
@@ -336,4 +336,26 @@
</ItemGroup>
</Target>
-</Project> \ No newline at end of file
+ <!-- Override adding packages to get the crossgen tool to only pull down the WinRT targeting pack and DiaSymReader since we have everything else locally. -->
+ <Target Name="AddCrossgenToolPackageReferences"
+ BeforeTargets="CollectPackageReferences">
+ <ItemGroup>
+ <CrossgenToolPackageReference Include="$(MicrosoftTargetingPackPrivateWinRTPackage)" Version="$(MicrosoftTargetingPackPrivateWinRTVersion)" />
+
+ <!-- This tool is a prebuilt not buildable from source. -->
+ <CrossgenToolPackageReference
+ Condition="'$(DotNetBuildFromSource)' != 'true'"
+ Include="Microsoft.DiaSymReader.Native"
+ Version="$(MicrosoftDiaSymReaderNativeVersion)" />
+
+ <!--
+ If any tool packages are missing, add them with ExcludeAssets=All. Be careful not to modify
+ existing PackageReferences.
+ -->
+ <PackageReference
+ Include="@(CrossgenToolPackageReference)"
+ Exclude="@(PackageReference)"
+ ExcludeAssets="All"/>
+ </ItemGroup>
+ </Target>
+</Project>
diff --git a/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj
index 8a92a5716b8..bea575e85c8 100644
--- a/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj
+++ b/src/installer/pkg/projects/netcoreapp/pkg/legacy/Microsoft.NETCore.App.Internal.pkgproj
@@ -18,5 +18,10 @@
<BuildRuntimePackages>false</BuildRuntimePackages>
</PropertyGroup>
+ <ItemGroup>
+ <Dependency Include="Microsoft.NETCore.Platforms" Version="$(Version)" TargetFramework="$(NETCoreAppFramework)" />
+ <Dependency Include="Microsoft.NETCore.Targets" Version="$(Version)" TargetFramework="$(NETCoreAppFramework)" />
+ </ItemGroup>
+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
diff --git a/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj b/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj
index 5a0d9501e72..d9d6f3423c3 100644
--- a/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj
+++ b/src/installer/pkg/projects/netcoreapp/pkg/workaround/Microsoft.NETCore.App.pkgproj
@@ -20,7 +20,7 @@
</PropertyGroup>
<ItemGroup>
- <Dependency Include="$(MicrosoftNETCorePlatformsPackage)" Version="$(MicrosoftNETCorePlatformsVersion)" />
+ <Dependency Include="Microsoft.NETCore.Platforms" Version="$(Version)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
diff --git a/src/installer/pkg/projects/netcoreapp/sfx/Microsoft.NETCore.App.SharedFx.sfxproj b/src/installer/pkg/projects/netcoreapp/sfx/Microsoft.NETCore.App.SharedFx.sfxproj
index c24c1a8db2e..3ea98ed5d6c 100644
--- a/src/installer/pkg/projects/netcoreapp/sfx/Microsoft.NETCore.App.SharedFx.sfxproj
+++ b/src/installer/pkg/projects/netcoreapp/sfx/Microsoft.NETCore.App.SharedFx.sfxproj
@@ -1,4 +1,5 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project>
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<SfxIdentity>Microsoft.NETCore.App</SfxIdentity>
@@ -42,4 +43,14 @@
</PropertyGroup>
</Target>
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
+
+ <!--
+ Since the libraries configuration might be different than the installer configuration, we need to add additional restore sources
+ to be able to find packages produced in the libraries phase and consumed in the installer phase.
+ -->
+ <PropertyGroup>
+ <RestoreSources Condition="Exists('$(LibrariesShippingPackagesDir)')">$(RestoreSources);$(LibrariesShippingPackagesDir)</RestoreSources>
+ <RestoreSources Condition="Exists('$(LibrariesNonShippingPackagesDir)')">$(RestoreSources);$(LibrariesNonShippingPackagesDir)</RestoreSources>
+ </PropertyGroup>
</Project>
diff --git a/src/installer/pkg/projects/netcoreapp/src/localnetcoreapp.override.targets b/src/installer/pkg/projects/netcoreapp/src/localnetcoreapp.override.targets
index 401fd102d53..52f64d3386d 100644
--- a/src/installer/pkg/projects/netcoreapp/src/localnetcoreapp.override.targets
+++ b/src/installer/pkg/projects/netcoreapp/src/localnetcoreapp.override.targets
@@ -1,152 +1,98 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <!-- Targets to enable building the NETCoreApp shared framework from a local CoreCLR and CoreFX build. -->
-
- <Target Name="OverrideRuntimeFilesFromPackageResolve" Condition="'$(CoreCLROverridePath)' != ''" BeforeTargets="GetFilesFromPackageResolve">
- <Error Condition="!Exists('$(CoreCLROverridePath)')" Text="The path provided to CoreCLROverridePath ($(CoreCLROverridePath)) does not exist." />
+ <!--
+ Get paths from packages that are needed for crossgen. Only relevant for runtime-specific builds.
+ -->
+ <Target Name="GetCorePackagePaths"
+ DependsOnTargets="ResolveReferences">
<PropertyGroup>
- <CoreCLROverridePath>$([MSBuild]::NormalizeDirectory('$(CoreCLROverridePath)'))</CoreCLROverridePath>
+ <_winmdPackageDir>$(NuGetPackageRoot)$(MicrosoftTargetingPackPrivateWinRTPackage.ToLowerInvariant())/$(MicrosoftTargetingPackPrivateWinRTVersion)/</_winmdPackageDir>
+ <_diaSymReaderPackageDir>$(NuGetPackageRoot)microsoft.diasymreader.native/$(MicrosoftDiaSymReaderNativeVersion)/</_diaSymReaderPackageDir>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetArchitecture)' == 'arm' AND '$(OS)' == 'Windows_NT'">
+ <_crossHostArch>x86</_crossHostArch>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(TargetArchitecture)' == 'arm' AND '$(OS)' != 'Windows_NT'">
+ <_crossHostArch>x64</_crossHostArch>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(TargetArchitecture)' == 'arm64' AND '$(BuildArchitecture)' != 'arm64'">
+ <_crossHostArch>x64</_crossHostArch>
</PropertyGroup>
<PropertyGroup>
- <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">x64</CoreCLRCrossTargetComponentDirName>
- <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsWindows)' == 'true'">x86</CoreCLRCrossTargetComponentDirName>
- <CoreCLRCrossTargetComponentDirName Condition="'$(TargetArchitecture)' == 'arm' and '$(BuildArchitecture)' != 'arm' and '$(TargetsLinux)' == 'true'">x64</CoreCLRCrossTargetComponentDirName>
- <CoreCLRSharedFrameworkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLROverridePath)','sharedFramework'))</CoreCLRSharedFrameworkDir>
- <CoreCLRCrossTargetComponentDir
- Condition="'$(CoreCLRCrossTargetComponentDirName)' != ''">$([MSBuild]::NormalizeDirectory('$(CoreCLROverridePath)','$(CoreCLRCrossTargetComponentDirName)','sharedFramework'))</CoreCLRCrossTargetComponentDir>
+ <_crossDir Condition="'$(_crossHostArch)' != ''">/$(_crossHostArch)_$(TargetArchitecture)</_crossDir>
</PropertyGroup>
- <ItemGroup>
- <CoreCLRFiles Include="$(CoreCLRSharedFrameworkDir)*.*" />
- <CoreCLRCrossTargetFiles
- Include="$(CoreCLRCrossTargetComponentDir)*.*"
- Condition="'$(CoreCLRCrossTargetComponentDir)' != ''"
- IsNative="true" />
- <CoreCLRFiles Include="$(CoreCLROverridePath)Redist/**/*.dll" />
- <CoreCLRFiles>
- <IsNative>true</IsNative>
- </CoreCLRFiles>
- <CoreCLRFiles Include="$(CoreCLROverridePath)System.Private.CoreLib.dll" />
- <CoreCLRFiles
- Include="
- $(CoreCLRSharedFrameworkDir)PDB/*.pdb;
- $(CoreCLRSharedFrameworkDir)PDB/*.dbg;
- $(CoreCLRSharedFrameworkDir)PDB/*.dwarf" />
- <CoreCLRFiles Include="$(CoreCLROverridePath)PDB/System.Private.CoreLib.pdb" />
-
- <CoreCLRSystemPrivateCoreLibNiSymbolFiles
- Include="$(CoreCLROverridePath)PDB/System.Private.CoreLib.ni.pdb" />
- <CoreCLRFiles
- Include="@(CoreCLRSystemPrivateCoreLibNiSymbolFiles)"
- Condition="Exists('%(Identity)')" />
-
- <CoreCLRCrossTargetFiles Condition="'$(CoreCLRCrossTargetComponentDir)' != ''"
- Include="
- $(CoreCLRCrossTargetComponentDir)PDB/*.pdb;
- $(CoreCLRCrossTargetComponentDir)PDB/*.dbg;
- $(CoreCLRCrossTargetComponentDir)PDB/*.dwarf" />
-
- <CoreCLRCrossTargetFiles>
- <TargetPath>runtimes/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)/native</TargetPath>
- </CoreCLRCrossTargetFiles>
-
- <CoreCLRFiles Include="@(CoreCLRCrossTargetFiles)" />
-
- <!--
- Remove files we want to override from ReferenceCopyLocalPaths.
-
- Use distinct filenames: we may have a target arch file as well as cross-arch (build machine
- arch). In that case, the typical match-up condition fails:
-
- '@(CoreCLRFiles->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'
- We get 'clrjit.dll;clrjit.dll' == 'clrjit.dll', preventing clrjit.dll from being removed.
- Filtering CoreCLRFiles down to unique FileName+Extension items makes it work.
- -->
- <CoreCLRFileFileNameExtensions Include="@(CoreCLRFiles -> '%(FileName)%(Extension)')" />
- <ReferenceCopyLocalPaths
- Remove="@(ReferenceCopyLocalPaths)"
- Condition="'@(CoreCLRFileFileNameExtensions->Distinct())' == '%(FileName)%(Extension)'"/>
+ <ItemGroup>
+ <_requiredProperty Include="_winmdPackageDir" />
+ </ItemGroup>
- <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="$([System.String]::Copy('%(FileName)').StartsWith('mscordaccore_'))" />
+ <Message Text="%(_requiredProperty.Identity): $(%(_requiredProperty.Identity))" />
+ <Error Condition="'$(%(_requiredProperty.Identity))' == ''" Text="Required property %(_requiredProperty.Identity) was not set." />
+ <Error Condition="!Exists('$(%(_requiredProperty.Identity))')" Text="Required property %(_requiredProperty.Identity) with value '$(%(_requiredProperty.Identity))' does not exist." />
+ </Target>
- <ReferenceCopyLocalPaths Include="@(CoreCLRFiles)" NuGetPackageId="$(MicrosoftNETCoreRuntimeCoreCLRPackage)" />
+ <Target Name="GetCrossgenToolPaths"
+ DependsOnTargets="GetCorePackagePaths">
+ <ItemGroup>
+ <!-- Find crossgen tool assets in package cache to allow ExcludeAssets=All. -->
+ <_windowsWinMD Include="$(_winmdPackageDir)**/Windows.winmd" />
+ <_diaSymReaderAssembly Include="$(_diaSymReaderPackageDir)**\Microsoft.DiaSymReader.Native.*.dll" />
</ItemGroup>
- <Error Condition="'@(CoreCLRFiles)' == ''" Text="The path provided to CoreCLROverridePath ($(CoreCLROverridePath)) does not contain any files." />
- </Target>
+ <PropertyGroup>
+ <_runtimeDirectory>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'sharedFramework'))</_runtimeDirectory>
+ <_crossGenPath>$([MSBuild]::NormalizePath('$(CoreCLRArtifactsPath)', '$(CoreCLRCrossTargetComponentDirName)', 'sharedFramework', 'crossgen$(ApplicationFileExtension)'))</_crossGenPath>
+ </PropertyGroup>
- <Target Name="OverrideFrameworkFilesFromPackageResolve" Condition="'$(CoreFXOverridePath)' != ''" BeforeTargets="GetFilesFromPackageResolve">
- <Error Condition="!Exists('$(CoreFXOverridePath)')" Text="The path provided to CoreFXOverridePath ($(CoreFXOverridePath)) does not exist." />
+ <PropertyGroup>
+ <_coreLibDirectory>$(CoreCLRArtifactsPath)</_coreLibDirectory>
+ <_fxLibDirectory>$(LibrariesSharedFrameworkBinArtifactsPath)</_fxLibDirectory>
+ </PropertyGroup>
- <!-- Determine Libraries OSGroup for this build. Copied from "local live-live" PR. -->
<PropertyGroup>
- <CoreCLROSGroup Condition="'$(TargetsWindows)' == 'true'">Windows_NT</CoreCLROSGroup>
- <CoreCLROSGroup Condition="'$(TargetsLinux)' == 'true'">Linux</CoreCLROSGroup>
- <CoreCLROSGroup Condition="'$(TargetsOSX)' == 'true'">OSX</CoreCLROSGroup>
- <CoreCLROSGroup Condition="'$(TargetsFreeBSD)' == 'true'">FreeBSD</CoreCLROSGroup>
- <LibrariesOSGroup>$(CoreCLROSGroup)</LibrariesOSGroup>
+ <_jitPath>$([MSBuild]::NormalizePath('$(CoreCLRArtifactsPath)', '$(CoreCLRCrossTargetComponentDirName)', 'sharedFramework', '$(LibraryFilePrefix)clrjit$(LibraryFileExtension)'))</_jitPath>
</PropertyGroup>
- <ItemGroup>
- <CoreFXReferenceItems
- Include="$([MSBuild]::NormalizeDirectory('$(CoreFXOverridePath)', 'bin', 'ref', 'microsoft.netcore.app', '$(Configuration)'))*"
- NuGetPackageId="$(MicrosoftPrivateCoreFxNETCoreAppPackage)" />
-
- <CoreFXReferenceCopyLocalItems
- Include="
- $([MSBuild]::NormalizeDirectory('$(CoreFXOverridePath)', 'bin', 'pkg', 'netcoreapp', 'runtime', '$(LibrariesOSGroup)-$(Configuration)-$(TargetArchitecture)'))*;
- $([MSBuild]::NormalizeDirectory('$(CoreFXOverridePath)', 'bin', 'native', 'netcoreapp-$(LibrariesOSGroup)-$(Configuration)-$(TargetArchitecture)'))*"
- NuGetPackageId="runtime.$(PackageRID).$(MicrosoftPrivateCoreFxNETCoreAppPackage)" />
- </ItemGroup>
+ <PropertyGroup Condition="'@(_windowsWinMD)' != ''">
+ <_windowsWinMDDirectory>%(_windowsWinMD.RootDir)%(_windowsWinMD.Directory)</_windowsWinMDDirectory>
+ </PropertyGroup>
- <Error Condition="'@(CoreFXReferenceItems)' == ''" Text="The path provided to CoreFXOverridePath ($(CoreFXOverridePath)) has no CoreFXReferenceItems." />
- <Error Condition="'@(CoreFXReferenceCopyLocalItems)' == ''" Text="The path provided to CoreFXOverridePath ($(CoreFXOverridePath)) has no CoreFXReferenceCopyLocalItems." />
+ <PropertyGroup Condition="'@(_diaSymReaderAssembly)' != ''">
+ <_diaSymReaderToolDir>%(_diaSymReaderAssembly.RootDir)%(_diaSymReaderAssembly.Directory)</_diaSymReaderToolDir>
+ </PropertyGroup>
- <ItemGroup>
- <OverriddenFrameworkReferenceFiles
- Include="@(Reference)"
- Condition="
- '@(CoreFXReferenceItems->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)' And
- '@(CoreFXReferenceItems->'%(NuGetPackageId)')' == '%(NuGetPackageId)'">
- <CoreFXFile>@(CoreFXReferenceItems)</CoreFXFile>
- </OverriddenFrameworkReferenceFiles>
-
- <Reference Remove="@(OverriddenFrameworkReferenceFiles)" />
- <Reference Include="@(OverriddenFrameworkReferenceFiles->Metadata('CoreFXFile'))" />
-
- <OverriddenFrameworkImplementationFiles
- Include="@(ReferenceCopyLocalPaths)"
- Condition="
- '@(CoreFXReferenceCopyLocalItems->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)' And
- '@(CoreFXReferenceCopyLocalItems->'%(NuGetPackageId)')' == '%(NuGetPackageId)'">
- <CoreFXFile>@(CoreFXReferenceCopyLocalItems)</CoreFXFile>
- </OverriddenFrameworkImplementationFiles>
-
- <OverriddenFrameworkImplementationFiles>
- <IsNative Condition="$([System.String]::new('%(Identity)').ToLowerInvariant().Replace('\', '/').Contains('/native/'))">true</IsNative>
- </OverriddenFrameworkImplementationFiles>
+ <!--
+ DiaSymReader can't be built from source, so use an unrelated default directory in that case.
+ This is used as the working directory for crossgen calls.
+ -->
+ <PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
+ <_diaSymReaderToolDir>$(IntermediateOutputPath)</_diaSymReaderToolDir>
+ </PropertyGroup>
- <ReferenceCopyLocalPaths Remove="@(OverriddenFrameworkImplementationFiles)" />
- <ReferenceCopyLocalPaths Include="@(OverriddenFrameworkImplementationFiles->Metadata('CoreFXFile'))" />
- </ItemGroup>
+ <Message Text="%(_requiredProperty.Identity): $(%(_requiredProperty.Identity))" />
+ <Error Condition="'$(%(_requiredProperty.Identity))' == ''" Text="Required property %(_requiredProperty.Identity) was not set." />
+ <Error Condition="!Exists('$(%(_requiredProperty.Identity))')" Text="Required property %(_requiredProperty.Identity) with value '$(%(_requiredProperty.Identity))' does not exist." />
- <ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
- <_coreFXOverrideDocFiles
- Condition="'$(CoreFXOverridePath)' != '' And '%(NuGetPackageId)' == '$(MicrosoftPrivateCoreFxNETCoreAppPackage)'"
- Include="@(OverriddenFrameworkReferenceFiles->'$(CoreFXOverridePath)/../../bin/docs/%(FileName).xml')" />
- <_docFilesToPackage Include="@(_coreFXOverrideDocFiles)" Condition="Exists('%(Identity)')" />
+ <ItemGroup>
+ <!--
+ The following path must be passed to crossgen to locate all dependencies. Include it first
+ so in case of conflicts, DLLs are found in the framework being crossgenned.
+ -->
+ <_crossgenPlatformDirectories Include="%(_filesToCrossGen.RootDir)%(_filesToCrossGen.Directory)" />
+ <!-- the following path *must* be passed to crossgen as it has the CoreLib.ni.dll, it will not use the IL copy. -->
+ <_crossgenPlatformDirectories Include="$(_runtimeDirectory)" />
+ <_crossgenPlatformDirectories Include="$(_coreLibDirectory)" />
+ <_crossgenPlatformDirectories Include="$(_fxLibDirectory)" />
</ItemGroup>
- </Target>
- <Target Name="OverrideCrossgenToolPaths" DependsOnTargets="GetCorePackagePaths" AfterTargets="GetCrossgenToolPaths" BeforeTargets="CreateCrossGenImages">
- <PropertyGroup Condition="'$(CoreCLROverridePath)' != ''">
- <_runtimeDirectory>$(CoreCLROverridePath)</_runtimeDirectory>
- <_crossgenPath>$([MSBuild]::NormalizePath('$(CoreCLROverridePath)', '$(_crossHostArch)', 'crossgen$(ApplicationFileExtension)'))</_crossgenPath>
- <_CoreLibSharedDirectory>$(CoreCLROverridePath)</_CoreLibSharedDirectory>
- <_jitPath>$([MSBuild]::NormalizePath('$(CoreCLROverridePath)', '$(_crossHostArch)', '$(LibraryFilePrefix)clrjit$(LibraryFileExtension)'))</_jitPath>
+ <PropertyGroup>
+ <!-- Use PathSeparator so that we get a ':' on unix and ';' on windows
+ Escape the value so that the ';' doesn't result multiple lines when writing to the RSP file -->
+ <_pathSeparatorEscaped>$([MSBuild]::Escape($([System.IO.Path]::PathSeparator.ToString())))</_pathSeparatorEscaped>
+ <_crossgenPlatformAssemblies>@(_crossgenPlatformDirectories->'%(Identity)', '$(_pathSeparatorEscaped)')</_crossgenPlatformAssemblies>
</PropertyGroup>
</Target>
- <!-- !!!BEGIN PATCHING Sharedfx SDK target -->
<Target Name="GetFilesFromPackageResolve">
<ItemGroup>
<!-- RID-specific: include all runtime files. -->
@@ -155,9 +101,9 @@
calculate it by looking for native in the path -->
<IsNative Condition="$([System.String]::new('%(Identity)').ToLowerInvariant().Replace('\', '/').Contains('/native/'))">true</IsNative>
</RidSpecificFilesToPackage>
- <!-- !!!BEGIN CHANGE Persist existing TargetPath. -->
+ <!-- !!!BEGIN CHANGE Persist existing TargetPath. !!!-->
<RidSpecificFilesToPackage Condition="'%(RidSpecificFilesToPackage.TargetPath)' == ''">
- <!-- !!!END CHANGE -->
+ <!-- !!!END CHANGE !!! -->
<TargetPath Condition="'%(RidSpecificFilesToPackage.IsNative)' != 'true'">runtimes/$(PackageRID)/lib/$(PackageTargetFramework)</TargetPath>
<TargetPath Condition="'%(RidSpecificFilesToPackage.IsNative)' == 'true'">runtimes/$(PackageRID)/native</TargetPath>
</RidSpecificFilesToPackage>
@@ -192,6 +138,4 @@
</FilesToPackage>
</ItemGroup>
</Target>
- <!-- !!!END PATCHING -->
-
</Project>
diff --git a/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj b/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj
index cc80981a53f..b5edf4df303 100644
--- a/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj
+++ b/src/installer/pkg/projects/netcoreapp/src/netcoreapp.depproj
@@ -1,15 +1,16 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
<PropertyGroup>
<FrameworkPackageName>Microsoft.NETCore.App</FrameworkPackageName>
+ <BuildFullPlatformManifest>false</BuildFullPlatformManifest>
+ <CoreCLROSGroup Condition="'$(TargetsWindows)' == 'true'">Windows_NT</CoreCLROSGroup>
+ <CoreCLROSGroup Condition="'$(TargetsLinux)' == 'true'">Linux</CoreCLROSGroup>
+ <CoreCLROSGroup Condition="'$(TargetsOSX)' == 'true'">OSX</CoreCLROSGroup>
+ <CoreCLROSGroup Condition="'$(TargetsFreeBSD)' == 'true'">FreeBSD</CoreCLROSGroup>
+ <LibrariesOSGroup>$(CoreCLROSGroup)</LibrariesOSGroup>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="$(MicrosoftPrivateCoreFxNETCoreAppPackage)" Version="$(MicrosoftPrivateCoreFxNETCoreAppVersion)" />
- <PackageReference Include="transport.$(MicrosoftNETCoreRuntimeCoreCLRPackage)" Version="$(MicrosoftNETCoreRuntimeCoreCLRVersion)" />
- <PackageReference Include="$(MicrosoftNETCorePlatformsPackage)" Version="$(MicrosoftNETCorePlatformsVersion)" />
- <PackageReference Include="$(MicrosoftNETCoreTargetsPackage)" Version="$(MicrosoftNETCoreTargetsVersion)" />
<PackageReference Include="$(NETStandardLibraryPackage)" Version="$(NETStandardLibraryVersion)" />
</ItemGroup>
@@ -19,11 +20,8 @@
</ItemGroup>
<ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
- <!-- Bring in Platforms for RID graph, NETStandard.Library for build-tools,
- Targets for an empty runtime.json to reduce conflicts from 1.x packages -->
+ <!-- Bring in NETStandard.Library for build-tools. -->
<DependenciesToPackage Include="NETStandard.Library" />
- <DependenciesToPackage Include="Microsoft.NETCore.Platforms" />
- <DependenciesToPackage Include="Microsoft.NETCore.Targets" />
</ItemGroup>
<!-- get paths from packages that are needed for cross-gen and other includes,
@@ -32,51 +30,48 @@
Condition="'$(PackageTargetRuntime)' != ''"
DependsOnTargets="GetCorePackagePaths" />
- <Target Name="GetDependencyVersionFiles" DependsOnTargets="ResolveReferences;GetPackagePaths">
+ <Target Name="GetDependencyVersionFiles" />
+
+ <Target Name="AddRuntimeFilesToPackage" DependsOnTargets="ResolveCoreCLRFilesFromLocalBuild" BeforeTargets="GetFilesFromPackageResolve">
<ItemGroup>
- <_coreFxVersionFile
- Include="$(NuGetPackageRoot)$([System.String]::new('%(Reference.NuGetPackageId)').ToLowerInvariant())/%(Reference.NuGetPackageVersion)/version.txt"
- Condition="$([System.String]::new('%(Reference.Identity)').ToLowerInvariant().Contains('system.runtime.dll'))"
- Name="corefx" />
- <_coreClrVersionFile
- Include="$(_runtimePackageDir)version.txt"
- Name="coreclr" />
+ <CoreCLRFiles>
+ <TargetPath>runtimes/$(PackageRID)/native</TargetPath>
+ </CoreCLRFiles>
+
+ <CoreCLRFiles Condition="'%(FileName)' == 'crossgen'">
+ <TargetPath>tools</TargetPath>
+ </CoreCLRFiles>
- <DependencyVersionFile Include="@(_coreFxVersionFile);@(_coreClrVersionFile)" />
+ <CoreCLRCrossTargetFiles Condition="'%(FileName)' == 'clrjit' or '%(FileName)' == 'libclrjit'">
+ <TargetPath>runtimes/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)/native</TargetPath>
+ </CoreCLRCrossTargetFiles>
+ <CoreCLRCrossTargetFiles Condition="'%(FileName)' == 'crossgen'">
+ <TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
+ </CoreCLRCrossTargetFiles>
+ <CoreCLRCrossTargetFiles Condition="$([System.String]::new('%(FileName)').StartsWith('mscordaccore')) and '$(TargetsWindows)' == 'true'">
+ <TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
+ </CoreCLRCrossTargetFiles>
+ <CoreCLRCrossTargetFiles Condition="'%(FileName)%(Extension)' == 'mscordbi.dll' and '$(TargetsWindows)' == 'true'">
+ <TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
+ </CoreCLRCrossTargetFiles>
+ <ReferenceCopyLocalPaths Include="@(CoreCLRFiles);@(CoreCLRCrossTargetFiles)" />
</ItemGroup>
+ </Target>
- <Error
- Condition="'@(_coreFxVersionFile)' == ''"
- Text="Failed to locate corefx version.txt file." />
+ <Target Name="AddFrameworkFilesToPackage" DependsOnTargets="ResolveLibrariesFromLocalBuild" BeforeTargets="GetFilesFromPackageResolve">
+ <ItemGroup>
+ <LibrariesRefAssemblies TargetPath="ref/$(NETCoreAppFramework)" />
+ <Reference Include="@(LibrariesRefAssemblies)" />
+ </ItemGroup>
- <Error
- Condition="'@(_coreClrVersionFile)' == ''"
- Text="Failed to locate coreclr version.txt file." />
- </Target>
+ <ItemGroup Condition="'$(PackageRID)' != ''">
+ <LibrariesRuntimeFiles Condition="'%(IsNative)' != 'true'" TargetPath="runtimes/$(PackageRID)/lib/$(NETCoreAppFramework)" />
+ <LibrariesRuntimeFiles Condition="'%(IsNative)' == 'true'" TargetPath="runtimes/$(PackageRID)/native" />
+ <ReferenceCopyLocalPaths Include="@(LibrariesRuntimeFiles)" />
+ </ItemGroup>
- <!-- Fetches all the runtime items from the packages that we want to redist -->
- <Target Name="GetRuntimeFilesFromPackages"
- BeforeTargets="GetRuntimeFilesToPackage"
- DependsOnTargets="GetCorePackagePaths"
- Condition="'$(CoreCLROverridePath)' == ''">
- <ItemGroup Condition="'$(PackageTargetRuntime)' != ''">
- <_ToolsToPackage Include="$(_runtimePackageDir)tools/**/*.*"/>
- <FilesToPackage Include="@(_ToolsToPackage)">
- <NuGetPackageId>$(_runtimePackageId)</NuGetPackageId>
- <!--
- Trim '/' at the end of the target path, if exists. The packaging tools automatically add
- an ending '/' for files without any extension, resulting in e.g. 'tools//' for Linux
- 'crossgen', which creates a dir without a name in the nupkg. This folder collapses when
- extracted to disk, but results in confusing artifacts when inspected manually, especially
- when 'crossgen.dbg' is outside this nameless dir.
- -->
- <TargetPath>$([System.String]::new('tools/%(RecursiveDir)').TrimEnd('/'))</TargetPath>
- <IsNative>true</IsNative>
- </FilesToPackage>
- <FilesToPackage Condition="'$(_crossDir)' != ''" Include="$(_jitPackageDir)runtimes$(_crossDir)/native/*.*">
- <TargetPath>runtimes$(_crossDir)/native</TargetPath>
- <IsNative>true</IsNative>
- </FilesToPackage>
+ <ItemGroup>
+ <_docFilesToPackage Include="$(ArtifactsBinDir)/docs/%(LibrariesRefAssemblies.FileName).xml" Condition="Exists('$(ArtifactsBinDir)/docs/%(LibrariesRefAssemblies.FileName).xml')"/>
</ItemGroup>
</Target>
diff --git a/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj b/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj
index b2ac07d4ceb..46b4ba47107 100644
--- a/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj
+++ b/src/installer/test/PrepareTestAssets/PrepareTestAssets.proj
@@ -49,6 +49,8 @@
<ItemGroup>
<RestoreTestSource Include="$(ArtifactsShippingPackagesDir)" Key="artifacts-shipping-packages" />
<RestoreTestSource Include="$(ArtifactsNonShippingPackagesDir)" Key="artifacts-nonshipping-packages" />
+ <RestoreTestSource Include="$(LibrariesShippingPackagesDir)" Condition="Exists('$(LibrariesShippingPackagesDir)')" Key="libraries-shipping-packages" />
+ <RestoreTestSource Include="$(LibrariesNonShippingPackagesDir)" Condition="Exists('$(LibrariesNonShippingPackagesDir)')" Key="libraries-nonshipping-packages" />
<RestoreTestSource Include="$(TestStabilizedLegacyPackagesDir)" Key="stabilized-legacy-packages" />
<RestoreTestSource
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 8c12bd11d49..14b00bc14af 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -80,7 +80,7 @@
<IsShipping Condition="'$(IsTestProject)' == 'true'">false</IsShipping>
</PropertyGroup>
- <PropertyGroup>
+ <PropertyGroup>
<EnableProjectRestore Condition="'$(IsTestProject)' == 'true'">true</EnableProjectRestore>
</PropertyGroup>
@@ -142,6 +142,7 @@
<_packageRID Condition="'$(PortableBuild)' == 'true'">$(_portableOS)-$(ArchGroup)</_packageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(_packageRID)</PackageRID>
<PackageRID Condition="'$(PackageRID)' == ''">$(RuntimeOS)-$(ArchGroup)</PackageRID>
+ <TargetArchitecture>$(ArchGroup)</TargetArchitecture>
</PropertyGroup>
<!-- Set some shortcuts for more terse conditions in project files -->
@@ -182,14 +183,14 @@
<!-- 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'">
@@ -266,9 +267,6 @@
<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>
diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index 04cb558a814..6536d32bc16 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -1,4 +1,9 @@
<Project InitialTargets="AddSkipGetTargetFrameworkToProjectReferences">
+ <PropertyGroup>
+ <CoreCLROSGroup Condition="'$(CoreCLROSGroup)' == ''">$(_bc_OSGroup)</CoreCLROSGroup>
+ <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(_bc_ConfigurationGroup)</CoreCLRConfiguration>
+ </PropertyGroup>
+
<Import Project="..\..\Directory.Build.targets" />
<PropertyGroup>
@@ -40,15 +45,16 @@
<BinPlaceRef Condition="'$(BinPlaceRef)' == '' And ('$(IsReferenceAssembly)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRef>
<BinPlaceRuntime Condition="'$(BinPlaceRuntime)' == '' And ('$(IsRuntimeAssembly)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true')">true</BinPlaceRuntime>
+ <BinPlaceForTargetVertical Condition="'$(BinPlaceForTargetVertical)' == ''">true</BinPlaceForTargetVertical>
</PropertyGroup>
<ItemGroup Condition="'@(BinPlaceConfiguration)' == ''">
<!-- binplace to directories for the target vertical -->
- <BinPlaceConfiguration Include="$(_bc_TargetGroup)-$(_bc_OSGroup)">
+ <BinPlaceConfiguration Include="$(_bc_TargetGroup)-$(_bc_OSGroup)" Condition="'$(BinPlaceForTargetVertical)' == 'true'">
<RefPath>$(BuildConfigurationRefPath)</RefPath>
<RuntimePath>$(RuntimePath)</RuntimePath>
</BinPlaceConfiguration>
- <!-- binplace to directories for packages -->
+ <!-- binplace the shared framework -->
<BinPlaceConfiguration Condition="'$(IsNETCoreApp)' == 'true' and '$(BuildingNETCoreAppVertical)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
<PackageFileRefPath Condition="'$(IsNETCoreAppRef)' == 'true'">$(NETCoreAppPackageRefPath)</PackageFileRefPath>
<PackageFileRuntimePath>$(NETCoreAppPackageRuntimePath)</PackageFileRuntimePath>
@@ -82,7 +88,7 @@
<RefPath>$(RefRootPath)%(Identity)/</RefPath>
</BinPlaceConfiguration>
<!-- for BuildAllConfigurations make sure runtimepaths are created for all vertical targetgroups. -->
- <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp-$(_bc_OSGroup)">
+ <BinPlaceConfiguration Condition="'$(BuildAllConfigurations)' == 'true' and ('$(BinPlaceForTargetVertical)' == 'true' or '$(_bc_TargetGroup)' != 'netcoreapp')" Include="netcoreapp-$(_bc_OSGroup)">
<RuntimePath>$(ArtifactsBinDir)runtime/%(Identity)-$(ConfigurationGroup)-$(ArchGroup)</RuntimePath>
</BinPlaceConfiguration>
diff --git a/src/libraries/restore/dirs.proj b/src/libraries/restore/dirs.proj
index cf1b99f6e1e..9c11cf6e823 100644
--- a/src/libraries/restore/dirs.proj
+++ b/src/libraries/restore/dirs.proj
@@ -12,7 +12,6 @@
<Project Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp/netcoreapp.depproj" />
<Project Include="netstandard/netstandard.depproj" />
<Project Include="netfx/netfx.depproj" />
- <Project Include="runtime/runtime.depproj" />
<Project Include="tools/tools.depproj" />
<Project Include="harvestPackages/harvestPackages.depproj" />
<Project Include="binplacePackages/binplacePackages.depproj" />
diff --git a/src/libraries/restore/runtime/runtime.depproj b/src/libraries/restore/runtime/runtime.depproj
index bfb02bccfcd..d6520703f79 100644
--- a/src/libraries/restore/runtime/runtime.depproj
+++ b/src/libraries/restore/runtime/runtime.depproj
@@ -5,22 +5,16 @@
<RuntimeIdentifier Condition="'$(RuntimeOS)' == 'webassembly'">$(ToolRuntimeRID)</RuntimeIdentifier>
<NoWarn>$(NoWarn);NU1603;NU1605</NoWarn>
<SwapNativeForIL Condition="'$(SwapNativeForIL)' == '' and ('$(ConfigurationGroup)' == 'Debug' or '$(Coverage)' == 'true')">true</SwapNativeForIL>
+ <CoreCLROSGroup Condition="'$(CoreCLROSGroup)' == ''">$(DefaultOSGroup)</CoreCLROSGroup>
+ <CoreCLRConfiguration Condition="'$(CoreCLRConfiguration)' == ''">$(ConfigurationGroup)</CoreCLRConfiguration>
+ <BinPlaceForTargetVertical>false</BinPlaceForTargetVertical>
</PropertyGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.7.0" />
</ItemGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
- <!-- Non-shipping packages do not produce stable versions. -->
- <MicrosoftNETCoreRuntimeCoreCLRVersion>3.0.0-rc2.19462.14</MicrosoftNETCoreRuntimeCoreCLRVersion>
- <MicrosoftPrivateCorefxNETCoreAppVersion>4.6.0-rc2.19462.14</MicrosoftPrivateCorefxNETCoreAppVersion>
- </PropertyGroup>
-
<ItemGroup>
- <PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsVersion)" />
- <PackageReference Include="transport.Microsoft.NETCore.Runtime.CoreCLR" Version="$(MicrosoftNETCoreRuntimeCoreCLRVersion)" />
- <PackageReference Include="Microsoft.NETCore.TestHost" Version="$(MicrosoftNETCoreRuntimeCoreCLRVersion)" />
<PackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(MicrosoftNETCoreDotNetHostVersion)" />
<PackageReference Include="Microsoft.NETCore.DotNetHostPolicy" Version="$(MicrosoftNETCoreDotNetHostPolicyVersion)" />
<!-- We do not need apphost.exe and the 3.0 SDK will actually remove it.
@@ -30,7 +24,7 @@
</ItemGroup>
<ItemGroup>
- <PackageReference Condition="'$(TargetFramework)' == 'netcoreapp3.0'" Include="Microsoft.Private.Corefx.NETCoreApp" Version="$(MicrosoftPrivateCorefxNETCoreAppVersion)" />
+ <PackageReference Condition="'$(TargetFramework)' == 'netcoreapp3.0'" Include="Microsoft.Private.Corefx.NETCoreApp" Version="4.6.0-rc2.19462.14" />
</ItemGroup>
<!-- Setup the testing shared framework host -->
@@ -43,7 +37,7 @@
<HostFxrFileName Condition="'$(TargetsWindows)' == 'true'">hostfxr</HostFxrFileName>
<HostFxrFileName Condition="'$(TargetsWindows)' != 'true'">libhostfxr</HostFxrFileName>
-
+
<UseHardlink>true</UseHardlink>
<!-- workaround core-setup problem for hardlinking dotnet executable to testhost: core-setup #4742 -->
<UseHardlink Condition="'$(_runtimeOSFamily)' == 'FreeBSD'">false</UseHardlink>
@@ -68,39 +62,16 @@
</Target>
<Target Name="OverrideRuntime"
- Condition="'$(CoreCLROverridePath)' != ''"
+ DependsOnTargets="ResolveCoreCLRFilesFromLocalBuild"
AfterTargets="AfterResolveReferences;FilterNugetPackages">
- <Error Condition="!Exists('$(CoreCLROverridePath)')" Text="The path provided to CoreCLROverridePath ($(CoreCLROverridePath)) does not exist." />
- <PropertyGroup>
- <CoreCLRPDBOverridePath Condition="'$(CoreCLRPDBOverridePath)' == '' and Exists('$(CoreCLROverridePath)/PDB')">$(CoreCLROverridePath)/PDB</CoreCLRPDBOverridePath>
- </PropertyGroup>
<ItemGroup>
- <CoreCLRFiles Include="$(CoreCLROverridePath)/*.*" />
- <CoreCLRFiles Condition="'$(CoreCLRPDBOverridePath)' != ''" Include="$(CoreCLRPDBOverridePath)/*.pdb;$(CoreCLRPDBOverridePath)/*.dbg" />
-
- <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'@(CoreCLRFiles->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
<ReferenceCopyLocalPaths Include="@(CoreCLRFiles)" />
</ItemGroup>
-
- <Error Condition="'@(CoreCLRFiles)' == ''" Text="The path provided to CoreCLROverridePath ($(CoreCLROverridePath)) does not contain any files." />
- </Target>
-
- <Target Name="GetCoreLibPackagePath" Condition="'$(CoreCLROverridePath)' == ''" DependsOnTargets="ResolveAssemblyReferences">
- <ItemGroup>
- <_CoreLibFile Include="@(ReferenceCopyLocalPaths)" Condition="'%(FileName)' == 'System.Private.CoreLib'" />
- </ItemGroup>
- <PropertyGroup>
- <_CoreLibFilePath>%(_CoreLibFile.FullPath)</_CoreLibFilePath>
- <_CoreLibPackagePath>$(_CoreLibFilePath.SubString(0, $(_CoreLibFilePath.IndexOf('runtimes'))))</_CoreLibPackagePath>
- </PropertyGroup>
- <Error Condition="'$(_CoreLibPackagePath)' == '' or !Exists('$(_CoreLibPackagePath)')"
- Text="Could not locate the CoreClr package." />
</Target>
- <Target Name="GetCoreCLRILFiles" DependsOnTargets="GetCoreLibPackagePath">
+ <Target Name="GetCoreCLRILFiles" DependsOnTargets="ResolveCoreCLRFilesFromLocalBuild">
<ItemGroup>
- <CoreCLRILFiles Condition="'$(CoreCLROverridePath)' == ''" Include="$(_CoreLibPackagePath)/**/il/*.*" />
- <CoreCLRILFiles Condition="'$(CoreCLROverridePath)' != ''" Include="$(CoreCLROverridePath)/IL/*.*" />
+ <CoreCLRILFiles Include="$(CoreCLRArtifactsPath)/IL/*.*" />
</ItemGroup>
<Error Condition="'@(CoreCLRILFiles)' == ''" Text="Could not locate CoreCLR IL files." />
</Target>
@@ -115,5 +86,5 @@
<ReferenceCopyLocalPaths Include="@(CoreCLRILFiles)" />
</ItemGroup>
</Target>
-
+
</Project>
diff --git a/src/libraries/shims/manual/Directory.Build.props b/src/libraries/shims/manual/Directory.Build.props
index 57cdeb82eef..d133e1342d1 100644
--- a/src/libraries/shims/manual/Directory.Build.props
+++ b/src/libraries/shims/manual/Directory.Build.props
@@ -3,7 +3,7 @@
<!-- ensure these projects use a different intermediate and output directory than generated projects -->
<OutDirName>manual.$(MSBuildProjectName)</OutDirName>
</PropertyGroup>
-
+
<Import Project="..\Directory.Build.props" />
<!-- import generated projects in order to share generated properties -->
@@ -13,6 +13,8 @@
<IsRuntimeAssembly>true</IsRuntimeAssembly>
<!-- Use runtime assemblies for the TargetGroup, using build configuration OSGroup -->
<RefPath>$(ArtifactsBinDir)runtime/$(TargetGroup)-$(_bc_OSGroup)-$(_bc_ConfigurationGroup)-$(ArchGroup)/</RefPath>
+ <CoreCLROSGroup>$(_bc_OSGroup)</CoreCLROSGroup>
+ <CoreCLRConfiguration>$(_bc_ConfigurationGroup)</CoreCLRConfiguration>
</PropertyGroup>
<ItemGroup>
@@ -20,4 +22,10 @@
Include="$(RefPath)System.*.dll;$(RefPath)Microsoft.Win32.*.dll;$(RefPath)netstandard.dll"
Exclude="$(RefPath)$(MSBuildProjectName).dll" />
</ItemGroup>
+
+ <Target Name="AddSystemPrivateCoreLibReferencePath" DependsOnTargets="ResolveCoreCLRFilesFromLocalBuild" BeforeTargets="ResolveReferences">
+ <ItemGroup>
+ <ReferencePath Include="@(CoreCLRFiles)" Condition="'%(FileName)%(Extension)' == 'System.Private.CoreLib.dll'" />
+ </ItemGroup>
+ </Target>
</Project>
diff --git a/src/libraries/src.builds b/src/libraries/src.builds
index 508f68f077a..427c01d8e7c 100644
--- a/src/libraries/src.builds
+++ b/src/libraries/src.builds
@@ -9,6 +9,8 @@
<Project Include="$(MSBuildThisFileDirectory)*\src\*.csproj" Exclude="@(ProjectExclusions)" />
<Project Include="$(MSBuildThisFileDirectory)*\src\*.ilproj" Exclude="@(ProjectExclusions)" />
<Project Include="$(MSBuildThisFileDirectory)*\src\*.vbproj" Exclude="@(ProjectExclusions)" />
+ <!-- Explicitly include the runtime.depproj project here to correctly set up the test host. -->
+ <Project Include="$(MSBuildThisFileDirectory)restore\runtime\runtime.depproj" />
</ItemGroup>
<ItemGroup Condition="'$(DirectoryToBuild)' != ''">