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

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Hofer <viktor.hofer@microsoft.com>2022-01-18 18:07:01 +0300
committerViktor Hofer <viktor.hofer@microsoft.com>2022-02-24 14:32:04 +0300
commit9ebe0efa4850fb2e451befe1fdf7c2d3cbb5c862 (patch)
treeb89ad195ff24e3ddf4d092b3953731de4d55ace5
parentfbf95fde7c4a23571dab5586b649729ff454000f (diff)
sfx+oob split, shim project refactoring, P2Ps
Split the build of shared framework and out-of-band projects so that it's possible to just build the shard framework projects, which was requested by the CLR teams. In the next infrastructure rollout, the current "libs.ref+libs.src" subsets should be removed. Generate the targeting pack with an incomplete (without shims) frameworklist as part of the "libs.sfx" subset. Build the shim projects after the shared framework and oob projects and re-generate the targeting pack's frameworklist to include the shims. Refactor the shims so that they aren't grouped anymore by generated & manual. Instead group them by "ref" and "src" same as other libraries in the tree which allows to reference the source project shims and read from the ReferenceAssembly metadata. Use ProjectReferences in traversal projects and shim projects instead of named references that point to binplace directories (see graph below) This allows to build parts of the product dynamically, i.e. the shim projects, apicompat.proj, sfx.proj and oob.proj.
-rw-r--r--Directory.Build.props1
-rw-r--r--docs/coding-guidelines/project-guidelines.md11
-rw-r--r--eng/NoTargetsSdk.BeforeTargets.targets5
-rw-r--r--eng/Subsets.props24
-rw-r--r--eng/TraversalSdk.AfterProps.props8
-rw-r--r--eng/TraversalSdk.AfterTargets.targets11
-rw-r--r--eng/generators.targets6
-rw-r--r--eng/illink.targets23
-rw-r--r--eng/pipelines/common/templates/runtimes/build-test-job.yml2
-rw-r--r--eng/pipelines/runtime-official.yml2
-rw-r--r--eng/pipelines/runtime-richnav.yml2
-rw-r--r--eng/referenceAssemblies.props8
-rw-r--r--eng/references.targets23
-rw-r--r--eng/resolveContract.targets7
-rw-r--r--eng/targetingpacks.targets7
-rw-r--r--eng/versioning.targets16
-rw-r--r--global.json4
-rw-r--r--src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props1
-rw-r--r--src/libraries/Directory.Build.props3
-rw-r--r--src/libraries/Directory.Build.targets52
-rw-r--r--src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj3
-rw-r--r--src/libraries/NetCoreAppLibrary.props38
-rw-r--r--src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj1
-rw-r--r--src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj2
-rw-r--r--src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj1
-rw-r--r--src/libraries/System.Net.Quic/src/System.Net.Quic.csproj2
-rw-r--r--src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.proj7
-rw-r--r--src/libraries/System.Runtime/src/System.Runtime.csproj4
-rw-r--r--src/libraries/apicompat/ApiCompat.proj54
-rw-r--r--src/libraries/frameworklist.targets41
-rw-r--r--src/libraries/illink-oob.targets84
-rw-r--r--src/libraries/illink-sharedframework.targets66
-rw-r--r--src/libraries/illink-trimassemblies.targets41
-rw-r--r--src/libraries/oob-all.proj37
-rw-r--r--src/libraries/oob-ref.proj17
-rw-r--r--src/libraries/oob-src.proj32
-rw-r--r--src/libraries/oob.proj108
-rw-r--r--src/libraries/ref.proj99
-rw-r--r--src/libraries/sfx-ref.proj19
-rw-r--r--src/libraries/sfx-src.proj22
-rw-r--r--src/libraries/sfx.proj71
-rw-r--r--src/libraries/shims.proj19
-rw-r--r--src/libraries/shims/Directory.Build.props47
-rw-r--r--src/libraries/shims/Directory.Build.targets28
-rw-r--r--src/libraries/shims/System.Xml.props (renamed from src/libraries/shims/generated/System.Xml.props)2
-rw-r--r--src/libraries/shims/generateShims.proj60
-rw-r--r--src/libraries/shims/generated/Directory.Build.props37
-rw-r--r--src/libraries/shims/generated/Microsoft.VisualBasic.csproj11
-rw-r--r--src/libraries/shims/generated/System.ComponentModel.DataAnnotations.csproj11
-rw-r--r--src/libraries/shims/generated/System.Configuration.csproj11
-rw-r--r--src/libraries/shims/generated/System.Core.csproj11
-rw-r--r--src/libraries/shims/generated/System.Data.csproj11
-rw-r--r--src/libraries/shims/generated/System.Drawing.csproj11
-rw-r--r--src/libraries/shims/generated/System.IO.Compression.FileSystem.csproj11
-rw-r--r--src/libraries/shims/generated/System.Net.csproj11
-rw-r--r--src/libraries/shims/generated/System.Numerics.csproj11
-rw-r--r--src/libraries/shims/generated/System.Runtime.Serialization.csproj11
-rw-r--r--src/libraries/shims/generated/System.Security.csproj11
-rw-r--r--src/libraries/shims/generated/System.ServiceModel.Web.csproj11
-rw-r--r--src/libraries/shims/generated/System.ServiceProcess.csproj11
-rw-r--r--src/libraries/shims/generated/System.Transactions.csproj11
-rw-r--r--src/libraries/shims/generated/System.Web.csproj11
-rw-r--r--src/libraries/shims/generated/System.Windows.csproj11
-rw-r--r--src/libraries/shims/generated/System.Xml.Linq.csproj11
-rw-r--r--src/libraries/shims/generated/System.Xml.Serialization.csproj11
-rw-r--r--src/libraries/shims/generated/System.Xml.csproj11
-rw-r--r--src/libraries/shims/generated/System.csproj11
-rw-r--r--src/libraries/shims/generated/WindowsBase.csproj11
-rw-r--r--src/libraries/shims/generated/mscorlib.csproj11
-rw-r--r--src/libraries/shims/generated/netstandard.csproj11
-rw-r--r--src/libraries/shims/manual/Directory.Build.props26
-rw-r--r--src/libraries/shims/manual/System.Data.csproj9
-rw-r--r--src/libraries/shims/manual/System.Xml.csproj3
-rw-r--r--src/libraries/shims/manual/System.csproj5
-rw-r--r--src/libraries/shims/manual/mscorlib.csproj5
-rw-r--r--src/libraries/shims/netfxreference.props27
-rw-r--r--src/libraries/shims/ref/Directory.Build.props8
-rw-r--r--src/libraries/shims/ref/System.Data.csproj6
-rw-r--r--src/libraries/shims/ref/System.Xml.csproj6
-rw-r--r--src/libraries/shims/ref/System.csproj6
-rw-r--r--src/libraries/shims/ref/mscorlib.csproj6
-rw-r--r--src/libraries/shims/src/Directory.Build.props15
-rw-r--r--src/libraries/shims/src/Microsoft.VisualBasic.csproj6
-rw-r--r--src/libraries/shims/src/System.ComponentModel.DataAnnotations.csproj6
-rw-r--r--src/libraries/shims/src/System.Configuration.csproj6
-rw-r--r--src/libraries/shims/src/System.Core.csproj6
-rw-r--r--src/libraries/shims/src/System.Data.csproj10
-rw-r--r--src/libraries/shims/src/System.Data.forwards.cs (renamed from src/libraries/shims/manual/System.Data.forwards.cs)5
-rw-r--r--src/libraries/shims/src/System.Drawing.csproj6
-rw-r--r--src/libraries/shims/src/System.IO.Compression.FileSystem.csproj6
-rw-r--r--src/libraries/shims/src/System.Net.csproj6
-rw-r--r--src/libraries/shims/src/System.Numerics.csproj6
-rw-r--r--src/libraries/shims/src/System.Runtime.Serialization.csproj6
-rw-r--r--src/libraries/shims/src/System.Security.csproj6
-rw-r--r--src/libraries/shims/src/System.ServiceModel.Web.csproj6
-rw-r--r--src/libraries/shims/src/System.ServiceProcess.csproj6
-rw-r--r--src/libraries/shims/src/System.Transactions.csproj6
-rw-r--r--src/libraries/shims/src/System.Web.csproj6
-rw-r--r--src/libraries/shims/src/System.Windows.csproj6
-rw-r--r--src/libraries/shims/src/System.Xml.Linq.csproj6
-rw-r--r--src/libraries/shims/src/System.Xml.Serialization.csproj6
-rw-r--r--src/libraries/shims/src/System.Xml.csproj8
-rw-r--r--src/libraries/shims/src/System.csproj10
-rw-r--r--src/libraries/shims/src/System.forwards.cs (renamed from src/libraries/shims/manual/System.forwards.cs)2
-rw-r--r--src/libraries/shims/src/WindowsBase.csproj6
-rw-r--r--src/libraries/shims/src/mscorlib.csproj10
-rw-r--r--src/libraries/shims/src/mscorlib.forwards.cs (renamed from src/libraries/shims/manual/mscorlib.forwards.cs)2
-rw-r--r--src/libraries/shims/src/netstandard.csproj13
-rw-r--r--src/libraries/src.proj92
-rw-r--r--src/libraries/testPackages/build/Directory.Build.props2
-rw-r--r--src/libraries/testPackages/testPackages.proj2
-rw-r--r--src/libraries/tests.proj7
-rw-r--r--src/tests/Interop/IJW/getRefPackFolderFromArtifacts.ps12
113 files changed, 843 insertions, 963 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index b9cc1470bb7..5104b073389 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -304,7 +304,6 @@
<PropertyGroup>
<CustomBeforeNoTargets>$(RepositoryEngineeringDir)NoTargetsSdk.BeforeTargets.targets</CustomBeforeNoTargets>
- <CustomAfterTraversalProps>$(RepositoryEngineeringDir)TraversalSdk.AfterProps.props</CustomAfterTraversalProps>
<CustomAfterTraversalTargets>$(RepositoryEngineeringDir)TraversalSdk.AfterTargets.targets</CustomAfterTraversalTargets>
</PropertyGroup>
</Project>
diff --git a/docs/coding-guidelines/project-guidelines.md b/docs/coding-guidelines/project-guidelines.md
index 486a0afd091..e2b281c6790 100644
--- a/docs/coding-guidelines/project-guidelines.md
+++ b/docs/coding-guidelines/project-guidelines.md
@@ -6,10 +6,13 @@ In order to work in the dotnet/runtime repo you must first run build.cmd/sh from
- Restore tools
- Restore external dependencies
- CoreCLR - Copy to `bin\runtime\$(BuildTargetFramework)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)`
-- Build targeting pack
- - Build src\libraries\ref.proj which builds all references assembly projects. For reference assembly project information see [ref](#ref)
-- Build product
- - Build src\libraries\src.proj which builds all the source library projects. For source library project information see [src](#src).
+- Build shared framework projects
+ - Build src\libraries\sfx.proj which builds all shared framework projects.
+- Build out of band projects
+ - Build src\libraries\oob.proj which builds all the out-of-band (OOB) projects.
+
+For reference assembly project information see [ref](#ref)
+For source library project information see [src](#src)
# Build Pivots
Below is a list of all the various options we pivot the project builds on:
diff --git a/eng/NoTargetsSdk.BeforeTargets.targets b/eng/NoTargetsSdk.BeforeTargets.targets
index 9afaad0e75e..3b516d31887 100644
--- a/eng/NoTargetsSdk.BeforeTargets.targets
+++ b/eng/NoTargetsSdk.BeforeTargets.targets
@@ -1,9 +1,8 @@
<Project>
<PropertyGroup>
- <!-- NoTargets SDK needs a TFM set. Use the latest .NETCoreApp TFM that is supported by the SDK.
- Only set a default if the project isn't multi-targeting. -->
- <TargetFramework Condition="'$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">$(NetCoreAppToolCurrent)</TargetFramework>
+ <!-- NoTargets SDK needs a TFM set. Set a default if the project doesn't multi target. -->
+ <TargetFramework Condition="'$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
</Project> \ No newline at end of file
diff --git a/eng/Subsets.props b/eng/Subsets.props
index 809af20968e..1213b5407e9 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -71,7 +71,7 @@
<DefaultLibrariesSubsets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
'$(BuildTargetFramework)' == '' or
'$(BuildAllConfigurations)' == 'true'">libs.native+</DefaultLibrariesSubsets>
- <DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.ref+libs.src</DefaultLibrariesSubsets>
+ <DefaultLibrariesSubsets>$(DefaultLibrariesSubsets)libs.sfx+libs.oob</DefaultLibrariesSubsets>
<DefaultLibrariesSubsets Condition="'$(DotNetBuildFromSource)' != 'true'">$(DefaultLibrariesSubsets)+libs.pretest</DefaultLibrariesSubsets>
<DefaultHostSubsets>host.native+host.tools</DefaultHostSubsets>
@@ -144,8 +144,10 @@
<!-- Libs -->
<SubsetName Include="Libs" Description="The libraries native part, refs and source assemblies, test infra and packages, but NOT the tests (use Libs.Tests to request those explicitly). Equivalent to: $(DefaultLibrariesSubsets)" />
<SubsetName Include="Libs.Native" Description="The native libraries used in the shared framework." />
- <SubsetName Include="Libs.Ref" Description="The managed reference libraries." />
- <SubsetName Include="Libs.Src" Description="The managed implementation libraries." />
+ <SubsetName Include="Libs.Sfx" Description="The managed shared framework libraries." />
+ <SubsetName Include="Libs.Oob" Description="The managed out-of-band libraries." />
+ <SubsetName Include="Libs.Ref" OnDemand="true" Description="The managed reference libraries." />
+ <SubsetName Include="Libs.Src" OnDemand="true" Description="The managed implementation libraries." />
<SubsetName Include="Libs.PreTest" Description="Test assets which are necessary to run tests." />
<SubsetName Include="Libs.Packages" Description="The projects that produce NuGet packages from libraries." />
<SubsetName Include="Libs.Tests" OnDemand="true" Description="The test projects. Note that building this doesn't execute tests: you must also pass the '-test' argument." />
@@ -322,12 +324,20 @@
<ProjectToBuild Include="$(SharedNativeRoot)libs\build-native.proj" Category="libs" />
</ItemGroup>
- <ItemGroup Condition="$(_subset.Contains('+libs.ref+'))">
- <ProjectToBuild Include="$(LibrariesProjectRoot)ref.proj" Category="libs" />
+ <ItemGroup Condition="$(_subset.Contains('+libs.ref+')) or $(_subset.Contains('+libs.src+')) or $(_subset.Contains('+libs.sfx+'))">
+ <ProjectToBuild Include="$(LibrariesProjectRoot)sfx.proj"
+ Category="libs"
+ Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or
+ '$(BuildTargetFramework)' == '' or
+ '$(BuildAllConfigurations)' == 'true'">
+ <AdditionalProperties Condition="$(_subset.Contains('+libs.ref+'))">%(AdditionalProperties);RefOnly=true</AdditionalProperties>
+ </ProjectToBuild>
</ItemGroup>
- <ItemGroup Condition="$(_subset.Contains('+libs.src+'))">
- <ProjectToBuild Include="$(LibrariesProjectRoot)src.proj" Category="libs" />
+ <ItemGroup Condition="$(_subset.Contains('+libs.ref+')) or $(_subset.Contains('+libs.src+')) or $(_subset.Contains('+libs.oob+'))">
+ <ProjectToBuild Include="$(LibrariesProjectRoot)oob.proj" Category="libs">
+ <AdditionalProperties Condition="$(_subset.Contains('+libs.ref+'))">%(AdditionalProperties);RefOnly=true</AdditionalProperties>
+ </ProjectToBuild>
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+mono.wasmruntime+'))">
diff --git a/eng/TraversalSdk.AfterProps.props b/eng/TraversalSdk.AfterProps.props
deleted file mode 100644
index 9f3f5fdea7a..00000000000
--- a/eng/TraversalSdk.AfterProps.props
+++ /dev/null
@@ -1,8 +0,0 @@
-<Project>
-
- <PropertyGroup>
- <!-- Build for NetCoreAppCurrent by default if no BuildTargetFramework is supplied or if not all configurations are built. -->
- <TraversalGlobalProperties Condition="'$(BuildAllConfigurations)' != 'true'">BuildTargetFramework=$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))</TraversalGlobalProperties>
- </PropertyGroup>
-
-</Project>
diff --git a/eng/TraversalSdk.AfterTargets.targets b/eng/TraversalSdk.AfterTargets.targets
index f88c48dc867..4eac57bd138 100644
--- a/eng/TraversalSdk.AfterTargets.targets
+++ b/eng/TraversalSdk.AfterTargets.targets
@@ -9,10 +9,17 @@
<VSTestDependsOn>$(VSTestDependsOn);ResolveP2PReferences</VSTestDependsOn>
<PackDependsOn>$(PackDependsOn);ResolveP2PReferences</PackDependsOn>
<PublishDependsOn>$(PublishDependsOn);ResolveP2PReferences</PublishDependsOn>
+ <GetTargetPathDependsOn>ResolveP2PReferences</GetTargetPathDependsOn>
+ <!-- Filter out ProjectReferences which aren't compatible with the project's TargetFramework. -->
+ <OmitIncompatibleProjectReferences>true</OmitIncompatibleProjectReferences>
</PropertyGroup>
<ItemGroup Condition="'$(FilterTraversalProjectReferences)' == 'true'">
- <ProjectReference Update="@(ProjectReference)" SkipGetTargetFrameworkProperties="false" />
+ <!-- Override the Traversal SDK setting as filtering relies on the TargetFrameworkProperties being fetched
+ and don't flow the BuildTargetFramework property down. -->
+ <ProjectReference Update="@(ProjectReference)"
+ SkipGetTargetFrameworkProperties="false"
+ UndefineProperties="%(UndefineProperties);BuildTargetFramework" />
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/eng/generators.targets b/eng/generators.targets
index f13e56995af..e7835650b04 100644
--- a/eng/generators.targets
+++ b/eng/generators.targets
@@ -13,8 +13,7 @@
- references System.Runtime.InteropServices -->
<EnabledGenerators Include="DllImportGenerator"
Condition="'$(EnableDllImportGenerator)' == ''
- and '$(IsFrameworkSupportFacade)' != 'true'
- and '$(IsSourceProject)' == 'true'
+ and '$(IsRuntimeAssembly)' == 'true'
and '$(MSBuildProjectExtension)' == '.csproj'
and (
('@(Reference)' != ''
@@ -25,8 +24,7 @@
and '$(DisableImplicitAssemblyReferences)' == 'false'))" />
<EnabledGenerators Include="DllImportGenerator"
Condition="'$(EnableDllImportGenerator)' == ''
- and '$(IsFrameworkSupportFacade)' != 'true'
- and '$(IsSourceProject)' == 'true'
+ and '$(IsRuntimeAssembly)' == 'true'
and '$(MSBuildProjectExtension)' == '.csproj'
and ('$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFrameworkIdentifier)' == '.NETFramework' or ('$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '$(NetCoreAppCurrentVersion)'))))" />
</ItemGroup>
diff --git a/eng/illink.targets b/eng/illink.targets
index eecd3163559..320d21715ef 100644
--- a/eng/illink.targets
+++ b/eng/illink.targets
@@ -198,14 +198,22 @@
</ItemGroup>
</Target>
- <!-- ILLink.Tasks arguments common to runs for both individual libraries and for the entire runtime pack -->
- <Target Name="SetCommonILLinkArgs">
+ <Target Name="PrepareForAssembliesTrim">
+ <!-- ILLink.Tasks arguments common to runs for both individual libraries and for the entire runtime pack -->
<PropertyGroup>
<!-- don't remove attributes after build, our tooling is not ready for that -->
<ILLinkArgs>$(ILLinkArgs) --ignore-link-attributes true</ILLinkArgs>
<!-- ignore unresolved references -->
<ILLinkArgs>$(ILLinkArgs) --skip-unresolved true</ILLinkArgs>
</PropertyGroup>
+
+ <!-- When running from Desktop MSBuild, DOTNET_HOST_PATH is not set.
+ In this case, explicitly specify the path to the dotnet host. -->
+ <PropertyGroup Condition="'$(DOTNET_HOST_PATH)' == ''">
+ <!-- This is defined when building in Visual Studio. -->
+ <_DotNetHostDirectory>$(NetCoreRoot)</_DotNetHostDirectory>
+ <_DotNetHostFileName>$([System.IO.Path]::GetFileName('$(DotNetTool)'))</_DotNetHostFileName>
+ </PropertyGroup>
</Target>
<!-- ILLinkTrimAssembly
@@ -215,7 +223,7 @@
<UsingTask TaskName="ILLink" AssemblyFile="$(ILLinkTasksAssembly)" Condition="'$(ILLinkTasksAssembly)' != ''" />
<Target Name="ILLinkTrimAssembly"
Condition="'$(ILLinkTrimAssembly)' == 'true'"
- DependsOnTargets="SetCommonILLinkArgs">
+ DependsOnTargets="PrepareForAssembliesTrim">
<PropertyGroup>
<!-- default action for assemblies with IsTrimmable attribute -->
<ILLinkArgs>$(ILLinkArgs) --trim-mode skip</ILLinkArgs>
@@ -285,21 +293,12 @@
<ILLinkArgs Condition="@(_DependencyDirectories->Count()) > 0">$(ILLinkArgs) -d @(_DependencyDirectories->'"%(Identity)"', ' -d ')</ILLinkArgs>
</PropertyGroup>
- <!-- When running from Desktop MSBuild, DOTNET_HOST_PATH is not set.
- In this case, explicitly specify the path to the dotnet host. -->
- <PropertyGroup Condition=" '$(DOTNET_HOST_PATH)' == '' ">
- <!-- This is defined when building in Visual Studio. -->
- <_DotNetHostDirectory>$(NetCoreRoot)</_DotNetHostDirectory>
- <_DotNetHostFileName>$([System.IO.Path]::GetFileName('$(DotNetTool)'))</_DotNetHostFileName>
- </PropertyGroup>
-
<ILLink AssemblyPaths=""
RootAssemblyNames="@(ILLinkTrimInputAssembly)"
OutputDirectory="$(ILLinkTrimOutputPath)"
ExtraArgs="$(ILLinkArgs)"
ToolExe="$(_DotNetHostFileName)"
ToolPath="$(_DotNetHostDirectory)" />
-
</Target>
<!-- ILLink reporting.
diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml
index b05315fc785..0c933647923 100644
--- a/eng/pipelines/common/templates/runtimes/build-test-job.yml
+++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml
@@ -74,7 +74,7 @@ jobs:
- ${{ each variable in parameters.variables }}:
- ${{ variable }}
- name: liveRuntimeBuildParams
- value: 'libs.ref -c Release -ci'
+ value: 'libs.sfx+libs.oob /p:RefOnly=true -c Release -ci'
- name: compilerArg
value: ''
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml
index 1d404057335..c817f759a30 100644
--- a/eng/pipelines/runtime-official.yml
+++ b/eng/pipelines/runtime-official.yml
@@ -57,7 +57,7 @@ stages:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
- template: /eng/common/templates/job/source-index-stage1.yml
parameters:
- sourceIndexBuildCommand: build.cmd -subset libs.ref+libs.src -binarylog -os Linux -ci
+ sourceIndexBuildCommand: build.cmd -subset libs.sfx+libs.oob -binarylog -os Linux -ci
#
# Build CoreCLR
diff --git a/eng/pipelines/runtime-richnav.yml b/eng/pipelines/runtime-richnav.yml
index df7918ee877..341ec115ebf 100644
--- a/eng/pipelines/runtime-richnav.yml
+++ b/eng/pipelines/runtime-richnav.yml
@@ -37,7 +37,7 @@ jobs:
richCodeNavigationEnvironment: "production"
richCodeNavigationLanguage: "csharp"
timeoutInMinutes: 240
- buildArgs: -s libs.ref+libs.src -c debug -allConfigurations
+ buildArgs: -s libs.sfx+libs.oob -allConfigurations
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
diff --git a/eng/referenceAssemblies.props b/eng/referenceAssemblies.props
index f61d15a3926..8c986b4475a 100644
--- a/eng/referenceAssemblies.props
+++ b/eng/referenceAssemblies.props
@@ -1,14 +1,9 @@
<Project>
- <PropertyGroup Condition="'$(BuildAllProjects)' == 'true' and
- !$(BuildTargetFramework.StartsWith('netstandard')) and
- !$(BuildTargetFramework.StartsWith('net4'))">
- <AdditionalBuildTargetFrameworks>$(AdditionalBuildTargetFrameworks);netstandard2.0;netstandard2.1</AdditionalBuildTargetFrameworks>
+ <PropertyGroup>
<!-- Reference assemblies are special and don't initialize fields or have empty finalizers, etc. -->
<RunAnalyzers>false</RunAnalyzers>
- </PropertyGroup>
- <PropertyGroup>
<!-- disable warnings about unused fields -->
<NoWarn>$(NoWarn);CS0169;CS0649;CS8618</NoWarn>
@@ -30,4 +25,5 @@
<_Parameter1_IsLiteral>true</_Parameter1_IsLiteral>
</AssemblyAttribute>
</ItemGroup>
+
</Project>
diff --git a/eng/references.targets b/eng/references.targets
index 4603fb98566..c73b8295397 100644
--- a/eng/references.targets
+++ b/eng/references.targets
@@ -16,19 +16,17 @@
<ItemGroup Condition="'@(ProjectReference)' != ''">
<_coreLibProjectReference Include="@(ProjectReference->WithMetadataValue('Identity', '$(CoreLibProject)'))" />
- <ProjectReference Update="@(_coreLibProjectReference)">
- <!-- Don't flow TargetFramework and Platform to use same inputs and outputs as the CoreLib's build as part of the runtime. -->
- <UndefineProperties>$(UndefineProperties);TargetFramework;Platform</UndefineProperties>
+ <ProjectReference Update="@(_coreLibProjectReference)"
+ Private="false">
<SetConfiguration Condition="'$(RuntimeFlavor)' == 'CoreCLR' and
'$(Configuration)' != '$(CoreCLRConfiguration)'">Configuration=$(CoreCLRConfiguration)</SetConfiguration>
<SetConfiguration Condition="'$(RuntimeFlavor)' == 'Mono' and
'$(Configuration)' != '$(MonoConfiguration)'">Configuration=$(MonoConfiguration)</SetConfiguration>
- <Private>false</Private>
</ProjectReference>
<!-- If a CoreLib ProjectReference is present, make all P2P assets non transitive. -->
- <ProjectReference Update="@(ProjectReference)"
+ <ProjectReference Update="@(ProjectReference->WithMetadataValue('PrivateAssets', ''))"
PrivateAssets="all"
- Condition="'@(_coreLibProjectReference)' != ''" />
+ Condition="'$(IsSourceProject)' == 'true' and '@(_coreLibProjectReference)' != ''" />
</ItemGroup>
<!-- Disable TargetArchitectureMismatch warning when we reference CoreLib as it is platform specific. -->
@@ -78,8 +76,19 @@
<Target Name="ValidateReferenceAssemblyProjectReferences"
AfterTargets="ResolveReferences"
- Condition="'$(IsReferenceAssembly)' == 'true'">
+ Condition="'$(IsReferenceAssembly)' == 'true' and
+ '$(SkipValidateReferenceAssemblyProjectReferences)' != 'true'">
<Error Condition="'%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' and '%(ReferencePath.IsReferenceAssembly)' != 'true' and '%(ReferencePath.ReferenceAssembly)' == ''"
Text="Reference assemblies must only reference other reference assemblies and '%(ReferencePath.ProjectReferenceOriginalItemSpec)' is not a reference assembly project and does not set 'ProduceReferenceAssembly'." />
</Target>
+
+ <!-- An opt-in target to trim out private assemblies from the ref assembly ReferencePath. -->
+ <Target Name="TrimOutPrivateAssembliesFromReferencePath"
+ Condition="'$(CompileUsingReferenceAssemblies)' == 'true' and '$(TrimOutPrivateAssembliesFromReferencePath)' == 'true'"
+ AfterTargets="FindReferenceAssembliesForReferences">
+ <ItemGroup>
+ <ReferencePathWithRefAssemblies Remove="@(ReferencePathWithRefAssemblies)"
+ Condition="$(NetCoreAppLibraryNoReference.Contains('%(Filename);'))" />
+ </ItemGroup>
+ </Target>
</Project>
diff --git a/eng/resolveContract.targets b/eng/resolveContract.targets
index 327273a100e..0e0cfc05c56 100644
--- a/eng/resolveContract.targets
+++ b/eng/resolveContract.targets
@@ -28,7 +28,10 @@
DependsOnTargets="ResolveProjectReferences"
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
<ItemGroup>
- <TargetPathWithTargetPlatformMoniker ReferenceAssembly="@(ResolvedMatchingContract)" />
+ <!-- Allow to point to a different reference project than what GenFacades uses to generate the type forwards. -->
+ <TargetPathWithTargetPlatformMoniker ReferenceAssembly="@(ResolvedMatchingContractOverride)" />
+ <TargetPathWithTargetPlatformMoniker ReferenceAssembly="@(ResolvedMatchingContract)"
+ Condition="'@(ResolvedMatchingContractOverride)' == ''" />
</ItemGroup>
</Target>
@@ -38,7 +41,7 @@
Condition="'@(ProjectReference)' != '' and '@(_ResolvedProjectReferencePaths)' != ''">
<!-- If we have a ProjectReference to CoreLib, we need to compile against implementation assemblies. -->
<PropertyGroup Condition="@(_ResolvedProjectReferencePaths->AnyHaveMetadataValue('MSBuildSourceProjectFile', '$(CoreLibProject)'))">
- <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+ <CompileUsingReferenceAssemblies Condition="'$(CompileUsingReferenceAssemblies)' == ''">false</CompileUsingReferenceAssemblies>
</PropertyGroup>
<!-- Clear the ReferenceAssembly attribute on resolved P2Ps that set SkipUseReferenceAssembly to true. -->
<ItemGroup>
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index 33551569c64..63aa48746ab 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -146,6 +146,13 @@
<_targetingPackReferenceExclusion Include="@(DefaultReferenceExclusion)" />
</ItemGroup>
+ <!-- Filter out shims from the targeting pack references as an opt-in. -->
+ <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
+ '$(SkipTargetingPackShimReferences)' == 'true'">
+ <_targetingPackReferenceExclusion Include="@(NetFxReference)" />
+ <_targetingPackReferenceExclusion Include="netstandard" />
+ </ItemGroup>
+
<ItemGroup>
<_targetingPackReferenceWithProjectName Include="@(Reference->WithMetadataValue('ExternallyResolved', 'true')->Metadata('Filename'))"
OriginalIdentity="%(Identity)" />
diff --git a/eng/versioning.targets b/eng/versioning.targets
index 3a40200c173..f31612f41a4 100644
--- a/eng/versioning.targets
+++ b/eng/versioning.targets
@@ -107,7 +107,10 @@
<Target Name="AddOSPlatformAttributes"
BeforeTargets="GenerateAssemblyInfo"
AfterTargets="PrepareForBuild"
- Condition="'$(TargetPlatformIdentifier)' == '' and '$(IsTestProject)' != 'true' and '$(TargetFrameworkIdentifier)' != '.NETFramework'">
+ Condition="'$(TargetPlatformIdentifier)' == '' and
+ '$(IsTestProject)' != 'true' and
+ '$(TargetFrameworkIdentifier)' != '.NETFramework'
+ and '$(AddOSPlatformAttributes)' != 'false'">
<!-- Defensively de-dupe the values -->
<ItemGroup>
<_unsupportedOSPlatforms Include="$(UnsupportedOSPlatforms)" />
@@ -133,12 +136,15 @@
</ItemGroup>
</Target>
- <!-- Removes assembly level attributes from test projects. -->
- <Target Name="RemoveSupportedOSPlatformAttributeFromTestProjects"
+ <!-- Remove assembly level attributes from certain projects.
+ Use a target for that until https://github.com/dotnet/sdk/issues/14836 is implemented. -->
+ <Target Name="RemoveSupportedOSTargetPlatformAttributeFromProjects"
AfterTargets="GetAssemblyAttributes"
- Condition="'$(IsTestProject)' == 'true'">
+ BeforeTargets="CreateGeneratedAssemblyInfoInputsCacheFile">
<ItemGroup>
- <AssemblyAttribute Remove="System.Runtime.Versioning.SupportedOSPlatformAttribute" />
+ <AssemblyAttribute Remove="System.Runtime.Versioning.SupportedOSPlatformAttribute"
+ Condition="'$(IsTestProject)' == 'true' or '$(AddOSPlatformAttributes)' == 'false'" />
+ <!-- Don't include target platform attributes, since we use the target platform to represent RIDs instead. -->
<AssemblyAttribute Remove="System.Runtime.Versioning.TargetPlatformAttribute" />
</ItemGroup>
</Target>
diff --git a/global.json b/global.json
index 7850e7db3d0..d7074d2befb 100644
--- a/global.json
+++ b/global.json
@@ -15,8 +15,8 @@
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22114.7",
"Microsoft.DotNet.Helix.Sdk": "7.0.0-beta.22114.7",
"Microsoft.DotNet.SharedFramework.Sdk": "7.0.0-beta.22114.7",
- "Microsoft.Build.NoTargets": "3.1.0",
- "Microsoft.Build.Traversal": "3.0.23",
+ "Microsoft.Build.NoTargets": "3.3.0",
+ "Microsoft.Build.Traversal": "3.1.3",
"Microsoft.NET.Sdk.IL": "7.0.0-preview.2.22113.2"
}
}
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
index afc33ec68ee..25f85539d73 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
@@ -64,7 +64,6 @@
</PropertyGroup>
<Import Project="$(LibrariesProjectRoot)NetCoreAppLibrary.props" />
- <Import Project="$(LibrariesProjectRoot)shims/netfxreference.props" />
<ItemGroup>
<!-- Public libraries and shims -->
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 961c33028ea..4e62339ce80 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -107,9 +107,6 @@
<UseAppBundleRootForBuildingTests Condition="'$(ArchiveTests)' == 'true' and '$(BuildTestsOnHelix)' != 'true' and '$(TargetsAppleMobile)' == 'true'">true</UseAppBundleRootForBuildingTests>
<AppBundleRoot Condition="'$(UseAppBundleRootForBuildingTests)' == 'true'">$(ArtifactsDir)bundles\</AppBundleRoot>
- <NetCoreAppCurrentRefPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'ref', '$(NetCoreAppCurrent)'))</NetCoreAppCurrentRefPath>
- <NetCoreAppCurrentRuntimePath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'runtime', '$(NetCoreAppCurrent)-$(TargetOS)-$(Configuration)-$(TargetArchitecture)'))</NetCoreAppCurrentRuntimePath>
-
<CommonPathRoot>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'Common'))</CommonPathRoot>
<CommonPath>$([MSBuild]::NormalizeDirectory('$(CommonPathRoot)', 'src'))</CommonPath>
<CommonTestPath>$([MSBuild]::NormalizeDirectory('$(CommonPathRoot)', 'tests'))</CommonTestPath>
diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index f847f894bef..4e0f4aecebb 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -34,12 +34,26 @@
<NoWarn Condition="'$(IsPartialFacadeAssembly)' == 'true'">$(NoWarn);SYSLIB0003;SYSLIB0004;SYSLIB0015;SYSLIB0017;SYSLIB0021;SYSLIB0022;SYSLIB0023;SYSLIB0025;SYSLIB0032;SYSLIB0036</NoWarn>
<!-- Reset these properties back to blank, since they are defaulted by Microsoft.NET.Sdk -->
<WarningsAsErrors Condition="'$(WarningsAsErrors)' == 'NU1605'" />
- <IsNETCoreAppSrc Condition="'$(IsNETCoreAppSrc)' == '' and
- '$(IsSourceProject)' == 'true' and
+
+ <IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)' == '' and
+ '$(IsReferenceAssembly)' != 'true' and
+ '$(IsGeneratorProject)' != 'true' and
+ '$(IsTestProject)' != 'true' and
+ '$(IsTestSupportProject)' != 'true' and
+ '$(UsingMicrosoftNoTargetsSdk)' != 'true' and
+ '$(UsingMicrosoftTraversalSdk)' != 'true'">true</IsRuntimeAssembly>
+ <IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and
+ '$(IsRuntimeAssembly)' == 'true' and
+ Exists('$(LibrariesProjectRoot)$(MSBuildProjectName)') and
+ !Exists('$(LibrariesProjectRoot)$(MSBuildProjectName)/ref') and
+ !$(MSBuildProjectName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
+
+ <!-- The source of truth for these IsNETCoreApp* properties is NetCoreAppLibrary.props. -->
+ <IsNETCoreAppSrc Condition="('$(IsRuntimeAssembly)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true') and
$(NetCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsNETCoreAppSrc>
- <IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == '' and
- '$(IsReferenceAssembly)' == 'true' and
- $(NetCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsNETCoreAppRef>
+ <IsNETCoreAppRef Condition="('$(IsReferenceAssembly)' == 'true' or '$(IsRuntimeAndReferenceAssembly)' == 'true') and
+ $(NetCoreAppLibrary.Contains('$(AssemblyName);')) and
+ !$(NetCoreAppLibraryNoReference.Contains('$(AssemblyName);'))">true</IsNETCoreAppRef>
<!-- By default, disable implicit framework references for NetCoreAppCurrent libraries. -->
<DisableImplicitFrameworkReferences Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)')) and
@@ -62,11 +76,6 @@
<!-- Libraries-specific binplacing properties -->
<PropertyGroup>
- <IsRuntimeAssembly Condition="'$(IsRuntimeAssembly)'=='' and '$(IsReferenceAssembly)' != 'true' and '$(BinPlaceRef)' != 'true' and '$(IsGeneratorProject)' != 'true' and '$(IsTestProject)' != 'true' and '$(IsTestSupportProject)' != 'true'">true</IsRuntimeAssembly>
- <!-- Try to determine if this is a simple library without a ref project.
- https://github.com/dotnet/runtime/issues/19584 is tracking cleaning this up -->
- <IsRuntimeAndReferenceAssembly Condition="'$(IsRuntimeAndReferenceAssembly)' == '' and '$(IsRuntimeAssembly)' == 'true' and Exists('$(LibrariesProjectRoot)$(MSBuildProjectName)') and !Exists('$(LibrariesProjectRoot)$(MSBuildProjectName)/ref') and !$(MSBuildProjectName.StartsWith('System.Private'))">true</IsRuntimeAndReferenceAssembly>
-
<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>
@@ -82,21 +91,20 @@
</Target>
<ItemGroup Condition="'@(BinPlaceTargetFrameworks)' == ''">
- <!-- binplace to directories for the target vertical -->
+ <!-- Used by the runtime tests to prepare the CORE_ROOT layout. Don't use in libraries. -->
<BinPlaceTargetFrameworks Include="$(NetCoreAppCurrent)-$(TargetOS)"
Condition="'$(BinPlaceForTargetVertical)' == 'true'">
- <NativePath>$(NetCoreAppCurrentRuntimePath)</NativePath>
- <RefPath>$(NetCoreAppCurrentRefPath)</RefPath>
- <RuntimePath>$(NetCoreAppCurrentRuntimePath)</RuntimePath>
+ <NativePath>$(LibrariesAllBinArtifactsPath)</NativePath>
+ <RefPath>$(LibrariesAllRefArtifactsPath)</RefPath>
+ <RuntimePath>$(LibrariesAllBinArtifactsPath)</RuntimePath>
</BinPlaceTargetFrameworks>
<BinPlaceDir Include="$(MicrosoftNetCoreAppRefPackDir)analyzers\dotnet\$(AnalyzerLanguage)"
Condition="'$(IsNETCoreAppAnalyzer)' == 'true'" />
<!-- Setup the shared framework directory for testing -->
- <BinPlaceTargetFrameworks Include="$(NetCoreAppCurrent)-$(TargetOS)"
- Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
- <NativePath >$(NetCoreAppCurrentTestHostSharedFrameworkPath)</NativePath>
+ <BinPlaceTargetFrameworks Include="$(NetCoreAppCurrent)-$(TargetOS)">
+ <NativePath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</NativePath>
<RuntimePath Condition="'$(IsNETCoreAppSrc)' == 'true'">$(NetCoreAppCurrentTestHostSharedFrameworkPath)</RuntimePath>
</BinPlaceTargetFrameworks>
@@ -110,8 +118,16 @@
<BinPlaceTargetFrameworks Include="@(AdditionalBinPlaceTargetFrameworks)" />
</ItemGroup>
- <Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" />
+
+ <PropertyGroup>
+ <!-- Libraries non test projects shouldn't reference compat shims. -->
+ <SkipTargetingPackShimReferences Condition="'$(UseLocalTargetingRuntimePack)' == 'true' and
+ '$(IsTestProject)' != 'true' and
+ '$(IsTestSupportProject)' != 'true'">true</SkipTargetingPackShimReferences>
+ </PropertyGroup>
+
+ <Import Project="$(RepositoryEngineeringDir)codeOptimization.targets" />
<Import Project="$(RepositoryEngineeringDir)references.targets" />
<Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
<Import Project="$(RepositoryEngineeringDir)testing\tests.targets" Condition="'$(EnableTestSupport)' == 'true'" />
diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj
index b53c4a6b663..5d4bd6530b8 100644
--- a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj
+++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj
@@ -6,9 +6,10 @@
<!-- Use targeting pack references instead of granular ones in the project file. -->
<DisableImplicitAssemblyReferences>false</DisableImplicitAssemblyReferences>
<CLSCompliant>false</CLSCompliant>
- <IsRuntimeAssembly>false</IsRuntimeAssembly>
<IsPackable>true</IsPackable>
<PackageDescription>Suite of xUnit.net tests to check for container compatibility with Microsoft.Extensions.DependencyInjection.</PackageDescription>
+ <!-- this assembly doesn't need to be binplaced -->
+ <EnableBinPlacing>false</EnableBinPlacing>
</PropertyGroup>
<ItemGroup>
diff --git a/src/libraries/NetCoreAppLibrary.props b/src/libraries/NetCoreAppLibrary.props
index 7d7c71c6ecd..5c46266cb56 100644
--- a/src/libraries/NetCoreAppLibrary.props
+++ b/src/libraries/NetCoreAppLibrary.props
@@ -1,7 +1,33 @@
<Project>
<PropertyGroup>
<!-- The trailing semicolon is important for each entry! -->
+ <NetFxReference>
+ mscorlib;
+ Microsoft.VisualBasic;
+ System;
+ System.ComponentModel.DataAnnotations;
+ System.Configuration;
+ System.Core;
+ System.Data;
+ System.Drawing;
+ System.IO.Compression.FileSystem;
+ System.Net;
+ System.Numerics;
+ System.Runtime.Serialization;
+ System.Security;
+ System.ServiceProcess;
+ System.ServiceModel.Web;
+ System.Transactions;
+ System.Web;
+ System.Windows;
+ System.Xml;
+ System.Xml.Serialization;
+ System.Xml.Linq;
+ WindowsBase;
+ </NetFxReference>
<NetCoreAppLibrary>
+ $(NetFxReference)
+ netstandard;
Microsoft.CSharp;
Microsoft.VisualBasic.Core;
Microsoft.Win32.Primitives;
@@ -76,6 +102,7 @@
System.Net.WebSockets.Client;
System.Numerics.Vectors;
System.ObjectModel;
+ System.Private.CoreLib;
System.Private.DataContractSerialization;
System.Private.Runtime.InteropServices.JavaScript;
System.Private.Uri;
@@ -146,6 +173,15 @@
System.Xml.XPath;
System.Xml.XPath.XDocument;
</NetCoreAppLibrary>
+ <NetCoreAppLibraryNoReference>
+ System.Net.Quic;
+ System.Private.CoreLib;
+ System.Private.DataContractSerialization;
+ System.Private.Runtime.InteropServices.JavaScript;
+ System.Private.Uri;
+ System.Private.Xml;
+ System.Private.Xml.Linq;
+ </NetCoreAppLibraryNoReference>
<AspNetCoreAppLibrary>
Microsoft.Extensions.Caching.Abstractions;
Microsoft.Extensions.Caching.Memory;
@@ -205,7 +241,9 @@
</PropertyGroup>
<!-- Make available as an item. -->
<ItemGroup>
+ <NetFxReference Include="$(NetFxReference)" />
<NetCoreAppLibrary Include="$(NetCoreAppLibrary)" />
+ <NetCoreAppLibraryNoReference Include="$(NetCoreAppLibraryNoReference)" />
<AspNetCoreAppLibrary Include="$(AspNetCoreAppLibrary)" />
<WindowsDesktopCoreAppLibrary Include="$(WindowsDesktopCoreAppLibrary)" />
</ItemGroup>
diff --git a/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj b/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj
index 56a71b1d27b..d4160c2651a 100644
--- a/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj
+++ b/src/libraries/System.Diagnostics.EventLog/src/Messages/System.Diagnostics.EventLog.Messages.csproj
@@ -4,5 +4,6 @@
<Win32Resource>EventLogMessages.res</Win32Resource>
<!-- Override the parent Directory.Build.props -->
<SupportedOSPlatforms />
+ <EnableDllImportGenerator>false</EnableDllImportGenerator>
</PropertyGroup>
</Project> \ No newline at end of file
diff --git a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj
index 86043b1f0aa..81eb8e04bf3 100644
--- a/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj
+++ b/src/libraries/System.IO.Ports/pkg/runtime.native.System.IO.Ports.proj
@@ -11,7 +11,7 @@
<ItemGroup>
<!-- Listing the runtime specific packages to populate the dependencies section.
Not building these references to avoid unintentional Build/Pack invocations.
- They are filtered in the traversal build in src.proj based on the OutputRid. -->
+ They are filtered in the traversal build in oob-all.csproj based on the OutputRid. -->
<ProjectReference Include="$(MSBuildThisFileDirectory)*.proj" Exclude="$(MSBuildProjectFile)" BuildReference="false" />
</ItemGroup>
</Project>
diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
index 1d0cdaed9f8..59c5299406e 100644
--- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
+++ b/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj
@@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Nullable>enable</Nullable>
- <IsNETCoreAppRef>false</IsNETCoreAppRef>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Quic.cs" />
diff --git a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
index 12bcced0a5f..6d9e7e5f7cf 100644
--- a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
+++ b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
@@ -139,7 +139,7 @@
('$(TargetArchitecture)' == 'x64' or '$(TargetArchitecture)' == 'x86') and '$(DotNetBuildFromSource)' != 'true'">
<BinPlaceDir Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)" ItemName="NativeBinPlaceItem" />
<BinPlaceDir Include="$(NetCoreAppCurrentTestHostSharedFrameworkPath)" ItemName="NativeBinPlaceItem" />
- <BinPlaceDir Include="$(NetCoreAppCurrentRuntimePath)" ItemName="NativeBinPlaceItem" />
+ <BinPlaceDir Include="$(LibrariesAllBinArtifactsPath)" ItemName="NativeBinPlaceItem" />
<BinPlaceDir Include="$(LibrariesNativeArtifactsPath)" ItemName="NativeBinPlaceItem" />
<NativeBinPlaceItem Include="$(PkgSystem_Net_MsQuic_Transport)\runtimes\win10-$(TargetArchitecture)\native\*" />
</ItemGroup>
diff --git a/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.proj b/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.proj
deleted file mode 100644
index 304633a1911..00000000000
--- a/src/libraries/System.Runtime.Experimental/src/System.Runtime.Experimental.proj
+++ /dev/null
@@ -1,7 +0,0 @@
-<Project Sdk="Microsoft.Build.Traversal">
-
- <ItemGroup>
- <ProjectReference Include="..\ref\$(MSBuildProjectName).csproj" />
- </ItemGroup>
-
-</Project>
diff --git a/src/libraries/System.Runtime/src/System.Runtime.csproj b/src/libraries/System.Runtime/src/System.Runtime.csproj
index b8df760b6ba..b8ef29d02f5 100644
--- a/src/libraries/System.Runtime/src/System.Runtime.csproj
+++ b/src/libraries/System.Runtime/src/System.Runtime.csproj
@@ -20,4 +20,8 @@
<ProjectReference Include="$(CoreLibProject)" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.Uri\src\System.Private.Uri.csproj" />
</ItemGroup>
+ <ItemGroup>
+ <!-- Set the ReferenceAssembly metadata to the inbox version of System.Runtime and not to System.Runtime.Experimental. -->
+ <ProjectReference Include="..\ref\System.Runtime.csproj" ReferenceOutputAssembly="false" OutputItemType="ResolvedMatchingContractOverride" />
+ </ItemGroup>
</Project>
diff --git a/src/libraries/apicompat/ApiCompat.proj b/src/libraries/apicompat/ApiCompat.proj
index e27786ccb1a..fbbd7eb46e6 100644
--- a/src/libraries/apicompat/ApiCompat.proj
+++ b/src/libraries/apicompat/ApiCompat.proj
@@ -1,5 +1,25 @@
<Project Sdk="Microsoft.Build.NoTargets">
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ <!-- Reference the dependencies to have the assemblies available for API comparison. -->
+ <NoTargetsDoNotReferenceOutputAssemblies>false</NoTargetsDoNotReferenceOutputAssemblies>
+ <!-- Target reference assemblies instead of implementation assemblies. -->
+ <CompileUsingReferenceAssemblies>true</CompileUsingReferenceAssemblies>
+ <TrimOutPrivateAssembliesFromReferencePath>true</TrimOutPrivateAssembliesFromReferencePath>
+
+ <ApiCompatNSBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.netcoreapp.netstandard.txt</ApiCompatNSBaselineFile>
+ <ApiCompatNSOnlyBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.netcoreapp.netstandardOnly.txt</ApiCompatNSOnlyBaselineFile>
+ <PreviousNetCoreAppBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.PreviousNetCoreApp.txt</PreviousNetCoreAppBaselineFile>
+ </PropertyGroup>
+
+ <!-- For API comparision, ApiCompat needs both the inbox and the out-of-band assemblies plus the shims to be built. -->
+ <ItemGroup>
+ <ProjectReference Include="..\sfx-src.proj;
+ ..\oob-src.proj;
+ ..\shims.proj" />
+ </ItemGroup>
+
<ItemGroup>
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(NetCoreAppLatestStablePackageBaselineVersion)]" />
<PackageDownload Include="NETStandard.Library.Ref" Version="[$(NETStandardLibraryRefVersion)]" />
@@ -7,29 +27,16 @@
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="$(MicrosoftDotNetApiCompatVersion)" IsImplicitlyDefined="true" />
</ItemGroup>
- <Target Name="GetApiCompatInputsAndOutputs">
- <PropertyGroup>
- <ApiCompatNSBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.netcoreapp.netstandard.txt</ApiCompatNSBaselineFile>
- <ApiCompatNSOnlyBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.netcoreapp.netstandardOnly.txt</ApiCompatNSOnlyBaselineFile>
- <PreviousNetCoreAppBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.PreviousNetCoreApp.txt</PreviousNetCoreAppBaselineFile>
- <ApiCompatMarkerFile>$(BaseIntermediateOutputPath)marker.txt</ApiCompatMarkerFile>
- </PropertyGroup>
-
- <ItemGroup>
- <NetCoreAppCurrentRefFile Include="$(NetCoreAppCurrentRefPath)*.dll" />
- </ItemGroup>
- </Target>
-
<Target Name="RunApiCompat"
- DependsOnTargets="GetApiCompatInputsAndOutputs"
+ DependsOnTargets="FindReferenceAssembliesForReferences"
AfterTargets="Build"
- Inputs="@(NetCoreAppCurrentRefFile);$(ApiCompatNSBaselineFile);$(ApiCompatNSOnlyBaselineFile);$(PreviousNetCoreAppBaselineFile)"
- Outputs="$(ApiCompatMarkerFile)">
-
+ Inputs="@(ReferencePathWithRefAssemblies);$(ApiCompatNSBaselineFile);$(ApiCompatNSOnlyBaselineFile);$(PreviousNetCoreAppBaselineFile)"
+ Outputs="$(IntermediateOutputPath)$(TargetArchitecture)-marker.txt">
<PropertyGroup>
- <ApiCompatResponseFile>$(BaseIntermediateOutputPath)apicompat.rsp</ApiCompatResponseFile>
+ <ApiCompatResponseFile>$(IntermediateOutputPath)apicompat.rsp</ApiCompatResponseFile>
<ApiCompatExitCode>0</ApiCompatExitCode>
- <ApiCompatArgs>--impl-dirs "$(NetCoreAppCurrentRefPath.TrimEnd('\/'))"</ApiCompatArgs>
+ <!-- TODO: Replace with ReferencePathWithRefAssemblies when ApiCompat supports passing in a list of assemblies: https://github.com/dotnet/arcade/issues/8394. -->
+ <ApiCompatArgs>--impl-dirs "$(LibrariesAllRefArtifactsPath.TrimEnd('\/'))"</ApiCompatArgs>
<ApiCompatArgs Condition="'$(ApiCompatExcludeAttributeList)' != ''">$(ApiCompatArgs) --exclude-attributes "$(ApiCompatExcludeAttributeList)"</ApiCompatArgs>
</PropertyGroup>
@@ -45,6 +52,8 @@
<NetStandard21BaselineModifer Condition="'$(UpdateNETStandardBaseline)' == 'true'">&gt;</NetStandard21BaselineModifer>
</PropertyGroup>
+ <Message Importance="high" Text="ApiCompat -> Comparing $(NetCoreAppCurrent) reference assemblies against .NETStandard2.x and .NETCoreApp$(NetCoreAppLatestStableVersion)..." />
+
<Exec Command="$(_ApiCompatCommand) &quot;$(NetStandard21OnlyRef)&quot; @&quot;$(ApiCompatResponseFile)&quot; $(NetStandard21BaselineModifer) &quot;$(ApiCompatNSOnlyBaselineFile)&quot;"
CustomErrorRegularExpression="^[a-zA-Z]+ :"
StandardOutputImportance="Low"
@@ -77,9 +86,12 @@
<Error Condition="'$(ApiCompatExitCode)' != '0'" Text="ApiCompat failed comparing $(NetCoreAppLatestStable) to $(NetCoreAppCurrent). If this breaking change is intentional, the ApiCompat baseline can be updated by running 'dotnet build $(MSBuildThisFileFullPath) /p:UpdatePreviousNetCoreAppBaseline=true'" />
<!-- Create a marker file which serves as the target's output to enable incremental builds. -->
- <Touch Files="$(ApiCompatMarkerFile)"
+ <Touch Files="$(IntermediateOutputPath)$(TargetArchitecture)-marker.txt"
AlwaysCreate="true" />
-
+ </Target>
+
+ <Target Name="CleanAdditionalFiles" AfterTargets="Clean">
+ <RemoveDir Directories="$(IntermediateOutputPath)" />
</Target>
</Project>
diff --git a/src/libraries/frameworklist.targets b/src/libraries/frameworklist.targets
new file mode 100644
index 00000000000..6e1966fe424
--- /dev/null
+++ b/src/libraries/frameworklist.targets
@@ -0,0 +1,41 @@
+<Project Sdk="Microsoft.DotNet.SharedFramework.Sdk">
+
+ <PropertyGroup>
+ <IsPackable>false</IsPackable>
+ <FrameworkListOutputPath>$(MicrosoftNetCoreAppRefPackDataDir)FrameworkList.xml</FrameworkListOutputPath>
+ </PropertyGroup>
+
+ <Target Name="GetGenerateFrameworkListFileInputs">
+ <ItemGroup>
+ <SharedFrameworkAssemblyWithReferenceAssembly Include="@(SharedFrameworkAssembly->HasMetadata('ReferenceAssembly'))" />
+ <SharedFrameworkAssemblyWithoutReferenceAssembly Include="@(SharedFrameworkAssembly)"
+ Exclude="@(SharedFrameworkAssemblyWithReferenceAssembly)" />
+
+ <FrameworkListInputFile Include="@(SharedFrameworkAssemblyWithReferenceAssembly->Metadata('ReferenceAssembly'));
+ @(SharedFrameworkAssemblyWithoutReferenceAssembly)"
+ TargetPath="ref/$(NetCoreAppCurrent)"
+ Condition="!$(NetCoreAppLibraryNoReference.Contains('%(Filename);'))" />
+ </ItemGroup>
+ </Target>
+
+ <UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetSharedFrameworkTaskFile)"/>
+ <Target Name="GenerateFrameworkListFile"
+ DependsOnTargets="GetGenerateFrameworkListFileInputs"
+ AfterTargets="Build"
+ Condition="'@(SharedFrameworkAssembly)' != ''"
+ Inputs="@(FrameworkListInputFile)"
+ Outputs="$(FrameworkListOutputPath)">
+ <ItemGroup>
+ <FrameworkListRootAttribute Include="Name" Value="$(NetCoreAppCurrentBrandName)" />
+ <FrameworkListRootAttribute Include="TargetFrameworkIdentifier" Value="$(NetCoreAppCurrentIdentifier)" />
+ <FrameworkListRootAttribute Include="TargetFrameworkVersion" Value="$(NetCoreAppCurrentVersion)" />
+ <FrameworkListRootAttribute Include="FrameworkName" Value="$(MicrosoftNetCoreAppFrameworkName)" />
+ </ItemGroup>
+
+ <CreateFrameworkListFile Files="@(FrameworkListInputFile)"
+ TargetFile="$(FrameworkListOutputPath)"
+ TargetFilePrefixes="ref/;runtimes/"
+ RootAttributes="@(FrameworkListRootAttribute)" />
+ </Target>
+
+</Project>
diff --git a/src/libraries/illink-oob.targets b/src/libraries/illink-oob.targets
deleted file mode 100644
index d609c1d47bd..00000000000
--- a/src/libraries/illink-oob.targets
+++ /dev/null
@@ -1,84 +0,0 @@
-<Project>
-
- <Target Name="GetOOBAssembliesToTrim"
- DependsOnTargets="PrepareForAssembliesTrim">
-
- <PropertyGroup>
- <OOBAssembliesTrimmedArtifactsPath>$([MSBuild]::NormalizeDirectory('$(ILLinkTrimAssemblyArtifactsRootDir)', 'trimmed-oobs'))</OOBAssembliesTrimmedArtifactsPath>
- <OOBAssembliesMarkerFile>$(IntermediateOutputPath)oob-linker-$(TargetOS)-$(TargetArchitecture)-marker.txt</OOBAssembliesMarkerFile>
- </PropertyGroup>
-
- <ItemGroup>
- <!-- Include suppression XML files bin-placed in earlier per-library linker run. -->
- <OOBLibrarySuppressionsXml Include="$(ILLinkTrimAssemblyOOBSuppressionsXmlsDir)*.xml" />
-
- <!-- The following is the list of all the OOBs we will ignore for now -->
- <OOBAssemblyToIgnore Include="System.CodeDom" />
- <OOBAssemblyToIgnore Include="System.ComponentModel.Composition" />
- <OOBAssemblyToIgnore Include="System.ComponentModel.Composition.Registration" />
- <OOBAssemblyToIgnore Include="System.Composition.AttributedModel" />
- <OOBAssemblyToIgnore Include="System.Composition.Convention" />
- <OOBAssemblyToIgnore Include="System.Composition.Hosting" />
- <OOBAssemblyToIgnore Include="System.Composition.Runtime" />
- <OOBAssemblyToIgnore Include="System.Composition.TypedParts" />
- <OOBAssemblyToIgnore Include="System.Configuration.ConfigurationManager" />
- <OOBAssemblyToIgnore Include="System.Speech" />
-
- <NetCoreAppCurrentAssembly Include="$(NetCoreAppCurrentRuntimePath)*.dll"
- Exclude="$(NetCoreAppCurrentRuntimePath)*.Generator*.dll;
- $(NetCoreAppCurrentRuntimePath)*.Native.dll;
- $(NetCoreAppCurrentRuntimePath)*msquic.dll" />
- <SharedFrameworkAssembly Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)*.dll" />
-
- <!-- Move items to FileName so that we can subtract them -->
- <NetCoreAppCurrentAssemblyWithFilename Include="@(NetCoreAppCurrentAssembly -> '%(FileName)')"
- OriginalIdentity="%(Identity)" />
- <SharedFrameworkAssemblyWithFilename Include="@(SharedFrameworkAssembly -> '%(FileName)')"
- OriginalIdentity="%(Identity)" />
-
- <OOBAssemblyToTrimWithFileName Include="@(NetCoreAppCurrentAssemblyWithFilename)"
- Exclude="@(SharedFrameworkAssemblyWithFilename);
- @(OOBAssemblyToIgnore)" />
- <OOBAssemblyToTrim Include="@(OOBAssemblyToTrimWithFileName -> '%(OriginalIdentity)')" />
-
- <OOBAssemblyReferenceWithFilename Include="@(NetCoreAppCurrentAssemblyWithFilename)"
- Exclude="@(OOBAssemblyToTrimWithFileName)" />
- <OOBAssemblyReference Include="@(OOBAssemblyReferenceWithFilename -> '%(OriginalIdentity)')" />
- <OOBAssemblyReference Include="$(SystemPrivateCoreLibPath)" />
- </ItemGroup>
-
- <ItemGroup>
- <OOBLibraryTrimmed Include="$(OOBAssembliesTrimmedArtifactsPath)*.*" />
- </ItemGroup>
-
- </Target>
-
- <Target Name="ILLinkTrimOOBAssemblies"
- AfterTargets="Build"
- DependsOnTargets="GetOOBAssembliesToTrim;PrepareForAssembliesTrim"
- Inputs="$(ILLinkTasksAssembly);@(OOBAssemblyToTrim);@(OOBAssemblyReference);@(OOBLibrarySuppressionsXml)"
- Outputs="$(OOBAssembliesMarkerFile)">
-
- <Message Text="Trimming $(PackageRID) out-of-band assemblies with ILLinker..." Importance="high" />
-
- <PropertyGroup>
- <OOBILLinkArgs>$(ILLinkArgs)</OOBILLinkArgs>
- <OOBILLinkArgs Condition="'@(OOBLibrarySuppressionsXml)' != ''" >$(OOBILLinkArgs) --link-attributes &quot;@(OOBLibrarySuppressionsXml->'%(FullPath)', '&quot; --link-attributes &quot;')&quot;</OOBILLinkArgs>
- </PropertyGroup>
-
- <ILLink AssemblyPaths=""
- RootAssemblyNames="@(OOBAssemblyToTrim)"
- ReferenceAssemblyPaths="@(OOBAssemblyReference)"
- OutputDirectory="$(OOBAssembliesTrimmedArtifactsPath)"
- ExtraArgs="$(OOBILLinkArgs)"
- ToolExe="$(_DotNetHostFileName)"
- ToolPath="$(_DotNetHostDirectory)" />
-
- <!-- Create a marker file which serves as the target's output to enable incremental builds. -->
- <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('$(OOBAssembliesMarkerFile)'))" />
- <Touch Files="$(OOBAssembliesMarkerFile)"
- AlwaysCreate="true" />
-
- </Target>
-
-</Project>
diff --git a/src/libraries/illink-sharedframework.targets b/src/libraries/illink-sharedframework.targets
deleted file mode 100644
index 8641657b9f5..00000000000
--- a/src/libraries/illink-sharedframework.targets
+++ /dev/null
@@ -1,66 +0,0 @@
-<Project>
-
- <Target Name="GetSharedFrameworkAssembliesToTrim"
- DependsOnTargets="PrepareForAssembliesTrim">
-
- <PropertyGroup>
- <SharedFrameworkAssembliesTrimmedArtifactsPath>$([MSBuild]::NormalizeDirectory('$(ILLinkTrimAssemblyArtifactsRootDir)', 'trimmed-runtimepack'))</SharedFrameworkAssembliesTrimmedArtifactsPath>
- <SharedFrameworkAssembliesMarkerFile>$(IntermediateOutputPath)sfx-linker-$(TargetOS)-$(TargetArchitecture)-marker.txt</SharedFrameworkAssembliesMarkerFile>
- </PropertyGroup>
-
- <ItemGroup>
- <!-- Include suppression XML files bin-placed in earlier per-library linker run. -->
- <SharedFrameworkSuppressionsXml Include="$(ILLinkTrimAssemblyRuntimePackSuppressionsXmlsDir)*.xml" />
- <!-- Collect CoreLib suppression XML files not bin-placed in earlier per-library linker run. CoreLib doesn't use bin-place logic. -->
- <SharedFrameworkSuppressionsXml Include="$(CoreLibSharedDir)ILLink\ILLink.Suppressions.LibraryBuild.xml" />
- <SharedFrameworkSuppressionsXml Condition="'$(RuntimeFlavor)' == 'CoreCLR'" Include="$(CoreClrProjectRoot)System.Private.CoreLib\$(ProjectILLinkSuppressionsFile).LibraryBuild.xml" />
-
- <SharedFrameworkAssemblyToTrim Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)*.dll" />
- <SharedFrameworkAssemblyToTrim Include="$(SystemPrivateCoreLibPath)" />
- </ItemGroup>
-
- <ItemGroup>
- <SharedFrameworkAssemblyTrimmed Include="$(SharedFrameworkAssembliesTrimmedArtifactsPath)*.*" />
- </ItemGroup>
-
- </Target>
-
- <Target Name="ILLinkTrimSharedFramework"
- AfterTargets="Build"
- DependsOnTargets="GetSharedFrameworkAssembliesToTrim;PrepareForAssembliesTrim"
- Inputs="$(ILLinkTasksAssembly);@(SharedFrameworkAssemblyToTrim);@(SharedFrameworkSuppressionsXml)"
- Outputs="$(SharedFrameworkAssembliesMarkerFile)">
-
- <Message Text="Trimming $(PackageRID) shared framework assemblies with ILLinker..." Importance="high" />
-
- <PropertyGroup>
- <SharedFrameworkILLinkArgs>$(ILLinkArgs)</SharedFrameworkILLinkArgs>
- <!-- update debug symbols -->
- <SharedFrameworkILLinkArgs>$(SharedFrameworkILLinkArgs) -b true</SharedFrameworkILLinkArgs>
- </PropertyGroup>
-
- <ItemGroup>
- <RootAssemblies Include="@(SharedFrameworkAssemblyToTrim)">
- <RootMode>library</RootMode>
- </RootAssemblies>
- </ItemGroup>
-
- <PropertyGroup>
- <SharedFrameworkILLinkArgs Condition="'@(SharedFrameworkSuppressionsXml)' != ''" >$(SharedFrameworkILLinkArgs) --link-attributes &quot;@(SharedFrameworkSuppressionsXml->'%(FullPath)', '&quot; --link-attributes &quot;')&quot;</SharedFrameworkILLinkArgs>
- </PropertyGroup>
-
- <ILLink AssemblyPaths=""
- RootAssemblyNames="@(RootAssemblies)"
- OutputDirectory="$(SharedFrameworkAssembliesTrimmedArtifactsPath)"
- ExtraArgs="$(SharedFrameworkILLinkArgs)"
- ToolExe="$(_DotNetHostFileName)"
- ToolPath="$(_DotNetHostDirectory)" />
-
- <!-- Create a marker file which serves as the target's output to enable incremental builds. -->
- <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('$(SharedFrameworkAssembliesMarkerFile)'))" />
- <Touch Files="$(SharedFrameworkAssembliesMarkerFile)"
- AlwaysCreate="true" />
-
- </Target>
-
-</Project>
diff --git a/src/libraries/illink-trimassemblies.targets b/src/libraries/illink-trimassemblies.targets
deleted file mode 100644
index 8de8f3264f6..00000000000
--- a/src/libraries/illink-trimassemblies.targets
+++ /dev/null
@@ -1,41 +0,0 @@
-<Project>
-
- <Target Name="PrepareForAssembliesTrim"
- DependsOnTargets="SetCommonILLinkArgs">
-
- <!-- Retrieve CoreLib's path as it isn't binplaced alongside the libraries - https://github.com/dotnet/runtime/issues/43095. -->
- <ItemGroup>
- <CoreLibProjectWithRuntimeConfig Include="$(CoreLibProject)">
- <!-- Don't flow TargetFramework and Platform to use same inputs and outputs as the CoreLib's build as part of the runtime. -->
- <UndefineProperties>$(UndefineProperties);TargetFramework;Platform</UndefineProperties>
- <!-- If conflicting, manually set the Configuration property of the CoreLib project so that it aligns with the specified runtime configuration in the libraries' build. -->
- <Properties Condition="'$(RuntimeFlavor)' == 'CoreCLR' and
- '$(Configuration)' != '$(CoreCLRConfiguration)'">Configuration=$(CoreCLRConfiguration)</Properties>
- <Properties Condition="'$(RuntimeFlavor)' == 'Mono' and
- '$(Configuration)' != '$(MonoConfiguration)'">Configuration=$(MonoConfiguration)</Properties>
- </CoreLibProjectWithRuntimeConfig>
- </ItemGroup>
-
- <MSBuild Projects="@(CoreLibProjectWithRuntimeConfig)"
- Targets="GetTargetPath">
- <Output TaskParameter="TargetOutputs" PropertyName="SystemPrivateCoreLibPath" />
- </MSBuild>
-
- <PropertyGroup>
- <ProjectILLinkSuppressionsFile>src\ILLink\ILLink.Suppressions</ProjectILLinkSuppressionsFile>
- </PropertyGroup>
-
- <!-- When running from Desktop MSBuild, DOTNET_HOST_PATH is not set.
- In this case, explicitly specify the path to the dotnet host. -->
- <PropertyGroup Condition=" '$(DOTNET_HOST_PATH)' == '' ">
- <!-- This is defined when building in Visual Studio. -->
- <_DotNetHostDirectory>$(NetCoreRoot)</_DotNetHostDirectory>
- <_DotNetHostFileName>$([System.IO.Path]::GetFileName('$(DotNetTool)'))</_DotNetHostFileName>
- </PropertyGroup>
-
- </Target>
-
- <Import Project="$(RepositoryEngineeringDir)illink.targets" />
- <Import Project="$(MSBuildThisFileDirectory)illink-sharedframework.targets" />
- <Import Project="$(MSBuildThisFileDirectory)illink-oob.targets" />
-</Project> \ No newline at end of file
diff --git a/src/libraries/oob-all.proj b/src/libraries/oob-all.proj
new file mode 100644
index 00000000000..a444e6eb449
--- /dev/null
+++ b/src/libraries/oob-all.proj
@@ -0,0 +1,37 @@
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <PropertyGroup Condition="'$(BuildTargetFramework)' == 'net48'">
+ <TargetFramework>$(BuildTargetFramework)</TargetFramework>
+ <!-- Filter ProjectReferences to build the best matching target framework only. -->
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
+ <!-- Reference all out-of-band projects. -->
+ <ItemGroup>
+ <ProjectReference Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
+ Exclude="@(ProjectExclusions);
+ $(MSBuildThisFileDirectory)*\src\**\*.shproj;
+ shims\src\*.csproj" />
+
+ <!-- Build these packages in the allconfigurations leg only. -->
+ <ProjectReference Remove="Microsoft.Internal.Runtime.AspNetCore.Transport\src\Microsoft.Internal.Runtime.AspNetCore.Transport.proj;
+ Microsoft.Internal.Runtime.WindowsDesktop.Transport\src\Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj;
+ Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj;
+ Microsoft.NETCore.Platforms\src\Microsoft.NETCore.Platforms.csproj"
+ Condition="'$(BuildAllConfigurations)' != 'true'" />
+
+ <!-- Skip these projects during source-build as they rely on external prebuilts. -->
+ <ProjectReference Remove="Microsoft.Extensions.DependencyInjection.Specification.Tests\src\Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj;
+ Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj"
+ Condition="'$(DotNetBuildFromSource)' == 'true'" />
+
+ <!-- During an official build, build the identity package only in the allconfigurations build, otherwise always. -->
+ <ProjectReference Include="$(MSBuildThisFileDirectory)*\pkg\runtime.native.*.proj"
+ Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or '$(BuildAllConfigurations)' == 'true'" />
+ <!-- During an official Build, build the rid specific package matching the OutputRid only outside of an allconfigurations build and only when targeting the CoreCLR runtime.
+ The limitation on the CoreCLR runtime is entirely artificial but avoids duplicate assets being publish. -->
+ <ProjectReference Include="$(MSBuildThisFileDirectory)*\pkg\runtime.$(OutputRid).*.proj"
+ Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or ('$(BuildAllConfigurations)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)')" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/oob-ref.proj b/src/libraries/oob-ref.proj
new file mode 100644
index 00000000000..33f580285a5
--- /dev/null
+++ b/src/libraries/oob-ref.proj
@@ -0,0 +1,17 @@
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
+ <!-- Filter ProjectReferences to build the best matching target framework only. -->
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
+ <!-- Reference all NetCoreAppCurrent out-of-band ref projects. -->
+ <ItemGroup>
+ <ProjectReference Include="$(MSBuildThisFileDirectory)*\ref\*.csproj"
+ Exclude="@(ProjectExclusions);
+ shims\ref\*.csproj;
+ @(NetCoreAppLibrary->'%(Identity)\ref\%(Identity).csproj')" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/oob-src.proj b/src/libraries/oob-src.proj
new file mode 100644
index 00000000000..1edbe734b93
--- /dev/null
+++ b/src/libraries/oob-src.proj
@@ -0,0 +1,32 @@
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ <!-- Filter ProjectReferences to build the best matching target framework only. -->
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
+ <!-- Reference all NetCoreAppCurrent out-of-band src projects. -->
+ <ItemGroup>
+ <ProjectReference Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
+ Exclude="@(ProjectExclusions);
+ $(MSBuildThisFileDirectory)*\src\*.shproj;
+ shims\src\*.csproj;
+ @(NetCoreAppLibrary->'%(Identity)\src\%(Identity).csproj');
+ Microsoft.VisualBasic.Core\src\Microsoft.VisualBasic.Core.vbproj" />
+
+ <!-- Don't build task and tools project in the NetCoreAppCurrent vertical. -->
+ <ProjectReference Remove="Microsoft.NETCore.Platforms\src\Microsoft.NETCore.Platforms.csproj;
+ Microsoft.XmlSerializer.Generator\src\Microsoft.XmlSerializer.Generator.csproj" />
+
+ <!-- Don't build meta-projects in the NetCoreAppCurrent vertical. -->
+ <ProjectReference Remove="Microsoft.Internal.Runtime.AspNetCore.Transport\src\Microsoft.Internal.Runtime.AspNetCore.Transport.proj;
+ Microsoft.Internal.Runtime.WindowsDesktop.Transport\src\Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj;
+ Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj" />
+
+ <!-- Filter out projects which aren't source-buildable. -->
+ <ProjectReference Remove="Microsoft.Extensions.DependencyInjection.Specification.Tests\src\Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj"
+ Condition="'$(DotNetBuildFromSource)' == 'true'" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/oob.proj b/src/libraries/oob.proj
new file mode 100644
index 00000000000..74a8bfb3b18
--- /dev/null
+++ b/src/libraries/oob.proj
@@ -0,0 +1,108 @@
+<Project Sdk="Microsoft.Build.NoTargets">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ <!-- By default, build the NetCoreAppCurrent vertical only. -->
+ <BuildTargetFramework Condition="'$(BuildAllConfigurations)' != 'true'">$(NetCoreAppCurrent)</BuildTargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
+ <ProjectReference Include="sfx-src.proj" OutputItemType="SharedFrameworkAssembly" />
+ <ProjectReference Include="oob-src.proj" OutputItemType="OOBAssembly" />
+ <ProjectReference Include="shims.proj" OutputItemType="SharedFrameworkAssembly" />
+
+ <ProjectReference Include="apicompat\ApiCompat.proj"
+ Condition="'$(DotNetBuildFromSource)' != 'true' and '$(RunApiCompat)' != 'false'" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(BuildTargetFramework)' != '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
+ <ProjectReference Include="oob-all.proj" SkipGetTargetFrameworkProperties="true" />
+ </ItemGroup>
+
+ <!-- Support building reference projects only. -->
+ <ItemGroup Condition="'$(RefOnly)' == 'true'">
+ <ProjectReference Remove="@(ProjectReference)" />
+ <ProjectReference Include="sfx-ref.proj" OutputItemType="SharedFrameworkAssembly" />
+ <ProjectReference Include="oob-ref.proj" />
+ <ProjectReference Include="shims.proj" OutputItemType="SharedFrameworkAssembly" />
+ </ItemGroup>
+
+ <ImportGroup Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
+ <!-- Re-generate the targeting pack's framework list to include shims. -->
+ <Import Project="frameworklist.targets" />
+ <!-- Import the illink file which contains some of the logic required to illink the out-of-band assemblies. -->
+ <Import Project="$(RepositoryEngineeringDir)illink.targets" />
+ </ImportGroup>
+
+ <Target Name="GetTrimOOBAssembliesInputs"
+ DependsOnTargets="ResolveProjectReferences">
+ <PropertyGroup>
+ <OOBAssembliesTrimmedArtifactsPath>$([MSBuild]::NormalizeDirectory('$(ILLinkTrimAssemblyArtifactsRootDir)', 'trimmed-oobs'))</OOBAssembliesTrimmedArtifactsPath>
+ <OOBAssembliesMarkerFile>$(IntermediateOutputPath)linker-$(TargetArchitecture)-marker.txt</OOBAssembliesMarkerFile>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <!-- Include suppression XML files bin-placed in earlier per-library linker run. -->
+ <OOBLibrarySuppressionsXml Include="$(ILLinkTrimAssemblyOOBSuppressionsXmlsDir)*.xml" />
+
+ <!-- The following is the list of all the OOBs we will ignore for now -->
+ <OOBAssemblyToIgnore Include="System.CodeDom;
+ System.ComponentModel.Composition;
+ System.ComponentModel.Composition.Registration;
+ System.Composition.AttributedModel;
+ System.Composition.Convention;
+ System.Composition.Hosting;
+ System.Composition.Runtime;
+ System.Composition.TypedParts;
+ System.Configuration.ConfigurationManager;
+ System.Speech;
+ Microsoft.Extensions.DependencyInjection.Specification.Tests" />
+
+ <!-- Move items to FileName so that we can subtract them. -->
+ <OOBAssemblyWithFilename Include="@(OOBAssembly->Metadata('Filename'))"
+ OriginalIdentity="%(Identity)" />
+ <OOBAssemblyToTrimWithFilename Include="@(OOBAssemblyWithFilename)"
+ Exclude="@(OOBAssemblyToIgnore)" />
+ <OOBAssemblyToIgnoreWithFilename Include="@(OOBAssemblyWithFilename)"
+ Exclude="@(OOBAssemblyToTrimWithFilename)" />
+
+ <OOBAssemblyToTrim Include="@(OOBAssemblyToTrimWithFilename->Metadata('OriginalIdentity'))" />
+ <OOBAssemblyReference Include="@(OOBAssemblyToIgnoreWithFilename->Metadata('OriginalIdentity'));
+ @(SharedFrameworkAssembly)" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="TrimOOBAssemblies"
+ AfterTargets="Build"
+ Condition="'$(RefOnly)' != 'true' and '@(OOBAssembly)' != ''"
+ DependsOnTargets="GetTrimOOBAssembliesInputs;PrepareForAssembliesTrim"
+ Inputs="$(ILLinkTasksAssembly);@(OOBAssemblyToTrim);@(OOBAssemblyReference);@(OOBLibrarySuppressionsXml)"
+ Outputs="$(OOBAssembliesMarkerFile)">
+ <Message Text="$(MSBuildProjectName) -> Trimming $(PackageRID) out-of-band assemblies with ILLinker..." Importance="high" />
+
+ <PropertyGroup>
+ <OOBILLinkArgs>$(ILLinkArgs)</OOBILLinkArgs>
+ <OOBILLinkArgs Condition="'@(OOBLibrarySuppressionsXml)' != ''" >$(OOBILLinkArgs) --link-attributes &quot;@(OOBLibrarySuppressionsXml->'%(FullPath)', '&quot; --link-attributes &quot;')&quot;</OOBILLinkArgs>
+ </PropertyGroup>
+
+ <ILLink AssemblyPaths=""
+ RootAssemblyNames="@(OOBAssemblyToTrim)"
+ ReferenceAssemblyPaths="@(OOBAssemblyReference)"
+ OutputDirectory="$(OOBAssembliesTrimmedArtifactsPath)"
+ ExtraArgs="$(OOBILLinkArgs)"
+ ToolExe="$(_DotNetHostFileName)"
+ ToolPath="$(_DotNetHostDirectory)" />
+
+ <!-- Create a marker file which serves as the target's output to enable incremental builds. -->
+ <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('$(OOBAssembliesMarkerFile)'))" />
+ <Touch Files="$(OOBAssembliesMarkerFile)"
+ AlwaysCreate="true" />
+ </Target>
+
+ <Target Name="SetAzureDevOpsVariableForBuiltPackages"
+ Condition="'$(ContinuousIntegrationBuild)' == 'true'"
+ AfterTargets="Build;Pack">
+ <Message Condition="Exists('$(ArtifactsDir)packages')" Importance="High" Text="##vso[task.setvariable variable=_librariesBuildProducedPackages]true" />
+ </Target>
+
+</Project>
diff --git a/src/libraries/ref.proj b/src/libraries/ref.proj
deleted file mode 100644
index 4d67c2f01c6..00000000000
--- a/src/libraries/ref.proj
+++ /dev/null
@@ -1,99 +0,0 @@
-<Project Sdk="Microsoft.Build.Traversal">
- <Import Project="Sdk.props" Sdk="Microsoft.DotNet.SharedFramework.Sdk" />
-
- <PropertyGroup>
- <TraversalGlobalProperties>BuildAllProjects=true</TraversalGlobalProperties>
- <IsPackable>false</IsPackable>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(BuildTargetFramework)' == 'net48'">
- <TargetFramework>$(BuildTargetFramework)</TargetFramework>
- <!-- Filter out ProjectReferences which aren't compatible with the above TargetFramework. -->
- <OmitIncompatibleProjectReferences>true</OmitIncompatibleProjectReferences>
- <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
- </PropertyGroup>
-
- <ItemGroup>
- <_allRef Include="$(MSBuildThisFileDirectory)*\ref\*.csproj"
- Exclude="@(ProjectExclusions)" />
- <NonNetCoreAppProject Include="@(_allRef)"
- Exclude="@(NetCoreAppLibrary->'%(Identity)\ref\%(Identity).csproj')" />
- <NetCoreAppProject Include="@(_allRef)"
- Exclude="@(NonNetCoreAppProject)" />
- <GeneratedShimProject Include="shims\generated\*.csproj"
- Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="@(NetCoreAppProject)" />
-
- <!-- Restore only and build later. -->
- <ProjectReference Include="@(NonNetCoreAppProject);
- @(GeneratedShimProject)"
- Condition="'$(MSBuildRestoreSessionId)' != ''" />
- </ItemGroup>
-
- <Target Name="BuildGeneratedShims"
- AfterTargets="Build"
- Condition="'@(GeneratedShimProject)' != ''">
- <MSBuild Targets="Build"
- Projects="@(GeneratedShimProject)"
- Properties="$(TraversalGlobalProperties)" />
- </Target>
-
- <Target Name="GetRefPackFiles">
- <ItemGroup>
- <RefPackLibFile Include="$(MicrosoftNetCoreAppRefPackRefDir)*.*">
- <TargetPath>ref/$(NetCoreAppCurrent)</TargetPath>
- <IsSymbolFile Condition="$([System.String]::Copy('%(Identity)').EndsWith('pdb'))">true</IsSymbolFile>
- </RefPackLibFile>
- </ItemGroup>
- <!-- We need to set this metadata in a separate ItemGroup than when the Items are initially populated in order to
- have access to the Extension metadata. -->
- <ItemGroup>
- <RefPackLibFile>
- <IsSymbolFile Condition="'%(Extension)' == '.pdb'">true</IsSymbolFile>
- </RefPackLibFile>
- </ItemGroup>
- </Target>
-
- <!-- Generate the ref pack's FrameworkList.xml -->
- <UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(DotNetSharedFrameworkTaskFile)"/>
- <Target Name="GenerateFrameworkListFile"
- DependsOnTargets="GetRefPackFiles"
- AfterTargets="BuildGeneratedShims"
- Inputs="@(RefPackLibFile)"
- Outputs="$(MicrosoftNetCoreAppRefPackDataDir)FrameworkList.xml"
- Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
- <ItemGroup>
- <FrameworkListRootAttribute Include="Name" Value="$(NetCoreAppCurrentBrandName)" />
- <FrameworkListRootAttribute Include="TargetFrameworkIdentifier" Value="$(NetCoreAppCurrentIdentifier)" />
- <FrameworkListRootAttribute Include="TargetFrameworkVersion" Value="$(NetCoreAppCurrentVersion)" />
- <FrameworkListRootAttribute Include="FrameworkName" Value="$(MicrosoftNetCoreAppFrameworkName)" />
- </ItemGroup>
-
- <CreateFrameworkListFile Files="@(RefPackLibFile)"
- TargetFile="$(MicrosoftNetCoreAppRefPackDataDir)FrameworkList.xml"
- TargetFilePrefixes="ref/;runtimes/"
- RootAttributes="@(FrameworkListRootAttribute)" />
- </Target>
-
- <Target Name="BuildNonNetCoreAppProjects"
- AfterTargets="GenerateFrameworkListFile">
- <MSBuild Targets="Build"
- BuildInParallel="true"
- Projects="@(NonNetCoreAppProject)"
- Properties="$(TraversalGlobalProperties)" />
- </Target>
-
- <!-- Build generated shims with the full reference closure, including OOB assemblies. -->
- <Target Name="RebuildGeneratedShims"
- AfterTargets="BuildNonNetCoreAppProjects"
- Condition="'@(GeneratedShimProject)' != ''">
- <MSBuild Targets="Build"
- Projects="@(GeneratedShimProject)"
- Properties="$(TraversalGlobalProperties);_Incremental=true" />
- </Target>
-
- <Import Project="Sdk.targets" Sdk="Microsoft.DotNet.SharedFramework.Sdk" />
-</Project>
diff --git a/src/libraries/sfx-ref.proj b/src/libraries/sfx-ref.proj
new file mode 100644
index 00000000000..ae5b1deaf96
--- /dev/null
+++ b/src/libraries/sfx-ref.proj
@@ -0,0 +1,19 @@
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
+ <!-- Filter ProjectReferences to build the best matching target framework only. -->
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
+ <!-- Reference all NetCoreAppCurrent shared framework ref projects. -->
+ <ItemGroup>
+ <AnyProject Include="$(MSBuildThisFileDirectory)*\ref\*.csproj"
+ Exclude="@(ProjectExclusions)" />
+ <NonNetCoreAppProject Include="@(AnyProject)"
+ Exclude="@(NetCoreAppLibrary->'%(Identity)\ref\%(Identity).csproj')" />
+ <ProjectReference Include="@(AnyProject)"
+ Exclude="@(NonNetCoreAppProject)" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/sfx-src.proj b/src/libraries/sfx-src.proj
new file mode 100644
index 00000000000..8e7679dac15
--- /dev/null
+++ b/src/libraries/sfx-src.proj
@@ -0,0 +1,22 @@
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ <!-- Filter ProjectReferences to build the best matching target framework only. -->
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
+ <!-- Reference all NetCoreAppCurrent shared framework src projects. -->
+ <ItemGroup>
+ <AnyProject Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
+ Exclude="@(ProjectExclusions);
+ $(MSBuildThisFileDirectory)*\src\*.shproj" />
+ <NonNetCoreAppProject Include="@(AnyProject)"
+ Exclude="@(NetCoreAppLibrary->'%(Identity)\src\%(Identity).csproj');
+ Microsoft.VisualBasic.Core\src\Microsoft.VisualBasic.Core.vbproj" />
+ <ProjectReference Include="@(AnyProject);
+ $(CoreLibProject)"
+ Exclude="@(NonNetCoreAppProject)" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/sfx.proj b/src/libraries/sfx.proj
new file mode 100644
index 00000000000..ff1e898d72d
--- /dev/null
+++ b/src/libraries/sfx.proj
@@ -0,0 +1,71 @@
+<Project Sdk="Microsoft.Build.NoTargets">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ <BuildInParallel>false</BuildInParallel>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <!-- The sfx ref projects must be built first as sfx src projects don't use P2Ps to reference each other. Instead the
+ references are defined manually via Reference items, therefore the reference assemblies must exist before that. -->
+ <ProjectReference Include="sfx-ref.proj">
+ <OutputItemType Condition="'$(RefOnly)' == 'true'">SharedFrameworkAssembly</OutputItemType>
+ </ProjectReference>
+ <!-- Support building only the reference assemblies. -->
+ <ProjectReference Include="sfx-src.proj"
+ OutputItemType="SharedFrameworkAssembly"
+ Condition="'$(RefOnly)' != 'true'" />
+ </ItemGroup>
+
+ <!-- Generate the targeting pack's framework list so that out-of-band projects can leverage it. -->
+ <Import Project="frameworklist.targets" />
+ <!-- Import the illink file which contains some of the logic required to illink the shared framework assemblies. -->
+ <Import Project="$(RepositoryEngineeringDir)illink.targets" />
+
+ <Target Name="GetTrimSharedFrameworkAssembliesInputs">
+ <PropertyGroup>
+ <SharedFrameworkAssembliesMarkerFile>$(IntermediateOutputPath)linker-$(TargetArchitecture)-marker.txt</SharedFrameworkAssembliesMarkerFile>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <!-- Include suppression XML files bin-placed in earlier per-library linker run. -->
+ <SharedFrameworkSuppressionsXml Include="$(ILLinkTrimAssemblyRuntimePackSuppressionsXmlsDir)*.xml" />
+ <!-- Collect CoreLib suppression XML files not bin-placed in earlier per-library linker run. CoreLib doesn't use bin-place logic. -->
+ <SharedFrameworkSuppressionsXml Include="$(CoreLibSharedDir)ILLink\ILLink.Suppressions.LibraryBuild.xml" />
+ <SharedFrameworkSuppressionsXml Condition="'$(RuntimeFlavor)' == 'CoreCLR'" Include="$(CoreClrProjectRoot)System.Private.CoreLib\src\ILLink\ILLink.Suppressions.LibraryBuild.xml" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="TrimSharedFrameworkAssemblies"
+ AfterTargets="Build"
+ DependsOnTargets="ResolveProjectReferences;GetTrimSharedFrameworkAssembliesInputs;PrepareForAssembliesTrim"
+ Condition="'$(RefOnly)' != 'true'"
+ Inputs="@(SharedFrameworkAssembly);@(SharedFrameworkSuppressionsXml);$(ILLinkTasksAssembly)"
+ Outputs="$(SharedFrameworkAssembliesMarkerFile)">
+ <Message Text="$(MSBuildProjectName) -> Trimming $(PackageRID) shared framework assemblies with ILLinker..." Importance="high" />
+
+ <PropertyGroup>
+ <SharedFrameworkILLinkArgs>$(ILLinkArgs)</SharedFrameworkILLinkArgs>
+ <!-- update debug symbols -->
+ <SharedFrameworkILLinkArgs>$(SharedFrameworkILLinkArgs) -b true</SharedFrameworkILLinkArgs>
+ <SharedFrameworkILLinkArgs Condition="'@(SharedFrameworkSuppressionsXml)' != ''" >$(SharedFrameworkILLinkArgs) --link-attributes &quot;@(SharedFrameworkSuppressionsXml->'%(FullPath)', '&quot; --link-attributes &quot;')&quot;</SharedFrameworkILLinkArgs>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <SharedFrameworkAssembly RootMode="library" />
+ </ItemGroup>
+
+ <ILLink AssemblyPaths=""
+ RootAssemblyNames="@(SharedFrameworkAssembly)"
+ OutputDirectory="$([MSBuild]::NormalizeDirectory('$(ILLinkTrimAssemblyArtifactsRootDir)', 'trimmed-runtimepack'))"
+ ExtraArgs="$(SharedFrameworkILLinkArgs)"
+ ToolExe="$(_DotNetHostFileName)"
+ ToolPath="$(_DotNetHostDirectory)" />
+
+ <!-- Create a marker file which serves as the target's output to enable incremental builds. -->
+ <MakeDir Directories="$([System.IO.Path]::GetDirectoryName('$(SharedFrameworkAssembliesMarkerFile)'))" />
+ <Touch Files="$(SharedFrameworkAssembliesMarkerFile)"
+ AlwaysCreate="true" />
+ </Target>
+
+</Project>
diff --git a/src/libraries/shims.proj b/src/libraries/shims.proj
new file mode 100644
index 00000000000..5c138fd1e70
--- /dev/null
+++ b/src/libraries/shims.proj
@@ -0,0 +1,19 @@
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ </PropertyGroup>
+
+ <!-- Reference the source project shims which themselves then reference their corresponding ref project, if it exists. -->
+ <ItemGroup>
+ <ProjectReference Include="shims\src\*.csproj" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(RefOnly)' == 'true'">
+ <ReferenceShimProject Include="shims\ref\*.csproj" />
+ <ProjectReference Include="@(ReferenceShimProject)" />
+ <!-- Omit projects which depend on source projects to be built. -->
+ <ProjectReference Remove="@(ReferenceShimProject->'shims\src\%(Filename)%(Extension)')" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/libraries/shims/Directory.Build.props b/src/libraries/shims/Directory.Build.props
index 6c19fac9a86..679f0230ef3 100644
--- a/src/libraries/shims/Directory.Build.props
+++ b/src/libraries/shims/Directory.Build.props
@@ -1,12 +1,11 @@
<Project>
<Import Project="..\Directory.Build.props" />
- <Import Project="netfxreference.props" />
-
- <PropertyGroup Condition="'$(IsFrameworkSupportFacade)' == 'true'">
- <IsNETCoreAppSrc>true</IsNETCoreAppSrc>
- <IsNETCoreAppRef>true</IsNETCoreAppRef>
+ <PropertyGroup>
+ <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
+ <!-- By default make shims compile against reference assemblies. -->
+ <CompileUsingReferenceAssemblies>true</CompileUsingReferenceAssemblies>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<GenFacadesIgnoreMissingTypes>true</GenFacadesIgnoreMissingTypes>
<!-- ensure the desktop compat shims reference the lowest possible version of dependencies
@@ -14,7 +13,11 @@
to reference the latest packages.
netstandard.dll doesn't need to do this since it has no dangling dependencies -->
<GenFacadesForceZeroVersionSeeds Condition="'$(MSBuildProjectName)' != 'netstandard'">true</GenFacadesForceZeroVersionSeeds>
- <HasMatchingContract>true</HasMatchingContract>
+ <!-- Opt out of some features which are on by default. -->
+ <EnableDllImportGenerator>false</EnableDllImportGenerator>
+ <RunApiCompat>false</RunApiCompat>
+ <ILLinkTrimAssembly>false</ILLinkTrimAssembly>
+ <AddOSPlatformAttributes>false</AddOSPlatformAttributes>
</PropertyGroup>
<ItemGroup Condition="'$(MSBuildProjectName)' == 'System.Runtime' or
@@ -26,10 +29,34 @@
<Compile Include="$(MSBuildThisFileDirectory)System.Void.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(IsFrameworkSupportFacade)' == 'true'">
- <!-- include any forwards needed by both generated and manual projects -->
- <Compile Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildProjectName).forwards.cs')"
- Include="$(MSBuildThisFileDirectory)$(MSBuildProjectName).forwards.cs" />
+ <ItemGroup>
+ <!-- Include any forwards needed by both ref and src projects. -->
+ <Compile Include="$(MSBuildThisFileDirectory)$(MSBuildProjectName).forwards.cs"
+ Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildProjectName).forwards.cs')" />
+ </ItemGroup>
+
+ <!-- Include any props setting files needed by both ref and src projects.-->
+ <Import Project="$(MSBuildThisFileDirectory)$(MSBuildProjectName).props"
+ Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildProjectName).props')" />
+
+ <ItemGroup>
+ <ProjectReference Include="$(MSBuildThisFileDirectory)..\sfx-src.proj" Condition="'$(RefOnly)' != 'true'" />
+ <ProjectReference Include="$(MSBuildThisFileDirectory)..\sfx-ref.proj" Condition="'$(RefOnly)' == 'true'" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(MSBuildProjectName)' != 'netstandard'">
+ <!-- .NET Framework shims compile against OOBs and the netstandard shim. -->
+ <ProjectReference Include="$(MSBuildThisFileDirectory)src\netstandard.csproj" />
+ <ProjectReference Include="$(MSBuildThisFileDirectory)..\oob-src.proj" Condition="'$(RefOnly)' != 'true'" />
+ <ProjectReference Include="$(MSBuildThisFileDirectory)..\oob-ref.proj" Condition="'$(RefOnly)' == 'true'" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <!-- System.Data.SqlClient is not live built anymore, reference it manually to avoid tfm nuget selection fallback errors
+ when the TargetOS i.e. is MacCatalyst. Set Private false so that it doesn't flow down to consuming projects. -->
+ <PackageDownload Include="System.Data.SqlClient"
+ Version="[$(SystemDataSqlClientVersion)]" />
+ <Reference Include="$([MSBuild]::NormalizePath('$(NuGetPackageRoot)', 'system.data.sqlclient', '$(SystemDataSqlClientVersion)', 'ref', 'netcoreapp2.1', 'System.Data.SqlClient.dll'))" Private="false" />
</ItemGroup>
</Project>
diff --git a/src/libraries/shims/Directory.Build.targets b/src/libraries/shims/Directory.Build.targets
index d7674d22fd3..0780fa92ad2 100644
--- a/src/libraries/shims/Directory.Build.targets
+++ b/src/libraries/shims/Directory.Build.targets
@@ -1,21 +1,17 @@
<Project>
+ <!-- Define before the import so that ResolvedMatchingContract is set before resolveContract.targets is imported. -->
+ <ItemGroup Condition="'$(MSBuildProjectName)' != 'netstandard'">
+ <PackageDownload Include="Microsoft.NETFramework.ReferenceAssemblies.net48"
+ Version="[$(MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion)]" />
+ <ResolvedMatchingContract Include="$([MSBuild]::NormalizePath('$(NuGetPackageRoot)', 'microsoft.netframework.referenceassemblies.net48', '$(MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion)', 'build', '.NETFramework', 'v4.8', '$(MSBuildProjectName).dll'))" />
+ </ItemGroup>
+
<Import Project="..\Directory.Build.targets" />
- <PropertyGroup>
- <NETFrameworkReferenceAssemblyTFM>net48</NETFrameworkReferenceAssemblyTFM>
- <NetFxRefPath>$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.netframework.referenceassemblies.$(NETFrameworkReferenceAssemblyTFM)', '$(MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion)', 'build', '.NETFramework', 'v4.8'))</NetFxRefPath>
+ <!-- Tell GenFacades to use reference assemblies instead of the implementation assemblies (for most of the shims). -->
+ <PropertyGroup Condition="'$(CompileUsingReferenceAssemblies)' != 'false'">
+ <TrimOutPrivateAssembliesFromReferencePath>true</TrimOutPrivateAssembliesFromReferencePath>
+ <GeneratePartialFacadeSourceDependsOn>$(GeneratePartialFacadeSourceDependsOn);FindReferenceAssembliesForReferences</GeneratePartialFacadeSourceDependsOn>
+ <GenFacadesReferencePathItemName>ReferencePathWithRefAssemblies</GenFacadesReferencePathItemName>
</PropertyGroup>
-
- <!-- Download the corresponding targeting pack to build against the contract. -->
- <ItemGroup Condition="'$(IsFrameworkSupportFacade)' == 'true' and '$(MSBuildProjectName)' == 'netstandard'">
- <PackageDownload Include="NETStandard.Library.Ref"
- Version="[$(NETStandardLibraryRefVersion)]" />
- <ResolvedMatchingContract Include="$(NETStandard21RefPath)$(MSBuildProjectName).dll" />
- </ItemGroup>
-
- <ItemGroup Condition="'$(IsFrameworkSupportFacade)' == 'true' and '$(MSBuildProjectName)' != 'netstandard'">
- <PackageDownload Include="Microsoft.NETFramework.ReferenceAssemblies.$(NETFrameworkReferenceAssemblyTFM)"
- Version="[$(MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion)]" />
- <ResolvedMatchingContract Include="$(NetFxRefPath)$(MSBuildProjectName).dll" />
- </ItemGroup>
</Project>
diff --git a/src/libraries/shims/generated/System.Xml.props b/src/libraries/shims/System.Xml.props
index 15ea92775b2..aa8f28fe456 100644
--- a/src/libraries/shims/generated/System.Xml.props
+++ b/src/libraries/shims/System.Xml.props
@@ -1,6 +1,6 @@
<Project>
<ItemGroup>
- <!-- type is obsolete in a way that prevents compilation, as such we cannot type forward to it, omit since it can never be used -->
+ <!-- type is obsolete in a way that prevents compilation, as such we cannot type forward to it, omit since it can never be used. -->
<GenFacadesOmitType Include="System.Xml.IApplicationResourceStreamResolver" />
</ItemGroup>
</Project>
diff --git a/src/libraries/shims/generateShims.proj b/src/libraries/shims/generateShims.proj
deleted file mode 100644
index fd7404dba99..00000000000
--- a/src/libraries/shims/generateShims.proj
+++ /dev/null
@@ -1,60 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <!-- IMPORTANT: please rebuild this project and check in the generated output
- when making changes to this file -->
- <ItemGroup>
- <GenFacadesContracts Include="@(NetFxReference)" ContractDir="NetFxRefPath" />
- <GenFacadesContracts Include="netstandard" ContractDir="NETStandard21RefPath" />
- </ItemGroup>
-
- <Target Name="GenerateShimProjectFiles"
- Inputs="$(MSBuildProjectFile)"
- Outputs="generated/%(GenFacadesContracts.Identity).csproj">
- <PropertyGroup>
- <_contractName>%(GenFacadesContracts.Identity)</_contractName>
- <_contractStrongNameKeyId>%(GenFacadesContracts.StrongNameKeyId)</_contractStrongNameKeyId>
- <_contractStrongNameKeyId Condition="'$(_contractStrongNameKeyId)' == ''">Microsoft</_contractStrongNameKeyId>
- <_contractAssembly>$(%(GenFacadesContracts.ContractDir))$(_contractName).dll</_contractAssembly>
- <_contractProjectFile>generated/$(_contractName).csproj</_contractProjectFile>
- </PropertyGroup>
-
- <GetAssemblyIdentity AssemblyFiles="$(_contractAssembly)">
- <Output TaskParameter="Assemblies" ItemName="_contractIdentity" />
- </GetAssemblyIdentity>
-
- <PropertyGroup>
- <_contractAssemblyVersion>%(_contractIdentity.Version)</_contractAssemblyVersion>
- <_contractAssemblyPublicKey>%(_contractIdentity.PublicKeyToken)</_contractAssemblyPublicKey>
- <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == 'b77a5c561934e089'">ECMA</_contractStrongNameKeyId>
- <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == 'b03f5f7f11d50a3a'">Microsoft</_contractStrongNameKeyId>
- <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == '31bf3856ad364e35'">MicrosoftShared</_contractStrongNameKeyId>
- <_contractStrongNameKeyId Condition="'$(_contractAssemblyPublicKey)' == 'cc7b13ffcd2ddd51'">Open</_contractStrongNameKeyId>
- <_contractProjectContent><![CDATA[<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'%24(MSBuildProjectFullPath)' == '%24(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>$(_contractAssemblyVersion)</AssemblyVersion>
- <StrongNameKeyId>$(_contractStrongNameKeyId)</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'%24(MSBuildProjectFullPath)' == '%24(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
-]]></_contractProjectContent>
- </PropertyGroup>
-
- <Error Condition="'$(_contractStrongNameKeyId)' == ''" Text="Could not determine StrongNameKeyId for contract $(_contractName) with public key token $(_contractAssemblyPublicKey)" />
-
- <WriteLinesToFile
- File="$(_contractProjectFile)"
- Lines="$(_contractProjectContent)"
- Overwrite="true" />
- <Message Importance="High" Text="Generated $(_contractProjectFile)" />
- </Target>
-
- <!-- boilerplate to satisfy Microsoft.Common.Targets -->
- <PropertyGroup>
- <SkipCopyBuildProduct>true</SkipCopyBuildProduct>
- </PropertyGroup>
- <Target Name="CreateManifestResourceNames" />
- <Target Name="CoreCompile" DependsOnTargets="GenerateShimProjectFiles" />
-</Project>
diff --git a/src/libraries/shims/generated/Directory.Build.props b/src/libraries/shims/generated/Directory.Build.props
deleted file mode 100644
index 4694448ae16..00000000000
--- a/src/libraries/shims/generated/Directory.Build.props
+++ /dev/null
@@ -1,37 +0,0 @@
-<Project>
- <PropertyGroup>
- <!-- Shims built from this directory will double as reference and runtime facades -->
- <BinPlaceRef>true</BinPlaceRef>
- <IsFrameworkSupportFacade>true</IsFrameworkSupportFacade>
- <!-- if a manual project exists, it will be used for the runtime facade instead -->
- <IsRuntimeAssembly Condition="!Exists('$(MSBuildThisFileDirectory)../manual/$(MSBuildProjectName).csproj')">true</IsRuntimeAssembly>
- </PropertyGroup>
-
- <Import Condition="Exists('$(MSBuildProjectName).props')" Project="$(MSBuildProjectName).props" />
- <Import Project="..\Directory.Build.props" />
-
- <PropertyGroup>
- <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
- </PropertyGroup>
-
- <!-- System.Data.SqlClient is not live built anymore, reference it manually. -->
- <ItemGroup>
- <PackageReference Include="System.Data.SqlClient"
- Version="$(SystemDataSqlClientVersion)" />
- </ItemGroup>
-
- <ItemGroup>
- <!-- reference everything but self -->
- <!-- Type duplicated in Microsoft.Extensions.DependencyModel. Exclude it for now: https://github.com/dotnet/runtime/issues/34420 -->
- <ReferencePath
- Include="$(NetCoreAppCurrentRefPath)*.dll"
- Exclude="$(NetCoreAppCurrentRefPath)$(MSBuildProjectName).dll;
- $(NetCoreAppCurrentRefPath)netstandard.dll;
- $(NetCoreAppCurrentRefPath)Microsoft.Extensions.DependencyModel.dll" />
-
- <!-- required by compiler to resolve core types -->
- <ProjectReference Include="netstandard.csproj"
- Condition="'$(MSBuildProjectName)' != 'netstandard'"
- SkipUseReferenceAssembly="true" />
- </ItemGroup>
-</Project>
diff --git a/src/libraries/shims/generated/Microsoft.VisualBasic.csproj b/src/libraries/shims/generated/Microsoft.VisualBasic.csproj
deleted file mode 100644
index 086cd1f1c38..00000000000
--- a/src/libraries/shims/generated/Microsoft.VisualBasic.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>10.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.ComponentModel.DataAnnotations.csproj b/src/libraries/shims/generated/System.ComponentModel.DataAnnotations.csproj
deleted file mode 100644
index 926a3d52b61..00000000000
--- a/src/libraries/shims/generated/System.ComponentModel.DataAnnotations.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Configuration.csproj b/src/libraries/shims/generated/System.Configuration.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.Configuration.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Core.csproj b/src/libraries/shims/generated/System.Core.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Core.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Data.csproj b/src/libraries/shims/generated/System.Data.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Data.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Drawing.csproj b/src/libraries/shims/generated/System.Drawing.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.Drawing.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.IO.Compression.FileSystem.csproj b/src/libraries/shims/generated/System.IO.Compression.FileSystem.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.IO.Compression.FileSystem.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Net.csproj b/src/libraries/shims/generated/System.Net.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.Net.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Numerics.csproj b/src/libraries/shims/generated/System.Numerics.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Numerics.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Runtime.Serialization.csproj b/src/libraries/shims/generated/System.Runtime.Serialization.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Runtime.Serialization.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Security.csproj b/src/libraries/shims/generated/System.Security.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.Security.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.ServiceModel.Web.csproj b/src/libraries/shims/generated/System.ServiceModel.Web.csproj
deleted file mode 100644
index 926a3d52b61..00000000000
--- a/src/libraries/shims/generated/System.ServiceModel.Web.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.ServiceProcess.csproj b/src/libraries/shims/generated/System.ServiceProcess.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.ServiceProcess.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Transactions.csproj b/src/libraries/shims/generated/System.Transactions.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Transactions.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Web.csproj b/src/libraries/shims/generated/System.Web.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.Web.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Windows.csproj b/src/libraries/shims/generated/System.Windows.csproj
deleted file mode 100644
index e501d2d3dfd..00000000000
--- a/src/libraries/shims/generated/System.Windows.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Xml.Linq.csproj b/src/libraries/shims/generated/System.Xml.Linq.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Xml.Linq.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Xml.Serialization.csproj b/src/libraries/shims/generated/System.Xml.Serialization.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Xml.Serialization.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.Xml.csproj b/src/libraries/shims/generated/System.Xml.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.Xml.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/System.csproj b/src/libraries/shims/generated/System.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/System.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/WindowsBase.csproj b/src/libraries/shims/generated/WindowsBase.csproj
deleted file mode 100644
index 926a3d52b61..00000000000
--- a/src/libraries/shims/generated/WindowsBase.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/mscorlib.csproj b/src/libraries/shims/generated/mscorlib.csproj
deleted file mode 100644
index da05b9146f5..00000000000
--- a/src/libraries/shims/generated/mscorlib.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>4.0.0.0</AssemblyVersion>
- <StrongNameKeyId>ECMA</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/generated/netstandard.csproj b/src/libraries/shims/generated/netstandard.csproj
deleted file mode 100644
index 7cf2a84f2ef..00000000000
--- a/src/libraries/shims/generated/netstandard.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project>
- <!-- this is a generated project, to make changes update the template above this directory
- and rebuild generateShims.proj -->
- <!-- only import SDK if this project is built directly -->
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <AssemblyVersion>2.1.0.0</AssemblyVersion>
- <StrongNameKeyId>Open</StrongNameKeyId>
- </PropertyGroup>
- <Import Condition="'$(MSBuildProjectFullPath)' == '$(MSBuildThisFileFullPath)'" Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-</Project>
diff --git a/src/libraries/shims/manual/Directory.Build.props b/src/libraries/shims/manual/Directory.Build.props
deleted file mode 100644
index d2bb299a05e..00000000000
--- a/src/libraries/shims/manual/Directory.Build.props
+++ /dev/null
@@ -1,26 +0,0 @@
-<Project>
- <PropertyGroup>
- <!-- ensure these projects use a different intermediate and output directory than generated projects -->
- <OutDirName>manual.$(MSBuildProjectName)</OutDirName>
- <IsFrameworkSupportFacade>true</IsFrameworkSupportFacade>
- </PropertyGroup>
-
- <Import Project="..\Directory.Build.props" />
-
- <!-- import generated projects in order to share generated properties -->
- <Import Project="..\generated\$(MSBuildProjectName).csproj" />
-
- <PropertyGroup>
- <IsRuntimeAssembly>true</IsRuntimeAssembly>
- <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <ReferencePath Include="$(NetCoreAppCurrentRuntimePath)System.*.dll;
- $(NetCoreAppCurrentRuntimePath)Microsoft.Win32.*.dll;
- $(NetCoreAppCurrentRuntimePath)netstandard.dll"
- Exclude="$(NetCoreAppCurrentRuntimePath)$(MSBuildProjectName).dll;
- $(NetCoreAppCurrentRuntimePath)System.*.Native.dll" />
- <ProjectReference Include="$(CoreLibProject)" />
- </ItemGroup>
-</Project>
diff --git a/src/libraries/shims/manual/System.Data.csproj b/src/libraries/shims/manual/System.Data.csproj
deleted file mode 100644
index 2f89b12251a..00000000000
--- a/src/libraries/shims/manual/System.Data.csproj
+++ /dev/null
@@ -1,9 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <ItemGroup>
- <Compile Include="System.Data.forwards.cs" />
- </ItemGroup>
- <ItemGroup>
- <!-- System.Data.SqlClient is not live built anymore, reference it manually. -->
- <PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
- </ItemGroup>
-</Project>
diff --git a/src/libraries/shims/manual/System.Xml.csproj b/src/libraries/shims/manual/System.Xml.csproj
deleted file mode 100644
index 11e762bbe73..00000000000
--- a/src/libraries/shims/manual/System.Xml.csproj
+++ /dev/null
@@ -1,3 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <!-- required in order to include runtime facade to obsoleted type System.Xml.IApplicationResourceStreamResolver -->
-</Project> \ No newline at end of file
diff --git a/src/libraries/shims/manual/System.csproj b/src/libraries/shims/manual/System.csproj
deleted file mode 100644
index f88c9ea94c0..00000000000
--- a/src/libraries/shims/manual/System.csproj
+++ /dev/null
@@ -1,5 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <ItemGroup>
- <Compile Include="System.forwards.cs" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/src/libraries/shims/manual/mscorlib.csproj b/src/libraries/shims/manual/mscorlib.csproj
deleted file mode 100644
index 43e1fcbd742..00000000000
--- a/src/libraries/shims/manual/mscorlib.csproj
+++ /dev/null
@@ -1,5 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
- <ItemGroup>
- <Compile Include="mscorlib.forwards.cs" />
- </ItemGroup>
-</Project>
diff --git a/src/libraries/shims/netfxreference.props b/src/libraries/shims/netfxreference.props
deleted file mode 100644
index deed47dc14b..00000000000
--- a/src/libraries/shims/netfxreference.props
+++ /dev/null
@@ -1,27 +0,0 @@
-<Project>
- <!-- IMPORTANT: please rebuild generateShims.proj when making changes to this file -->
- <ItemGroup>
- <NetFxReference Include="mscorlib" />
- <NetFxReference Include="Microsoft.VisualBasic" />
- <NetFxReference Include="System" />
- <NetFxReference Include="System.ComponentModel.DataAnnotations" />
- <NetFxReference Include="System.Configuration" />
- <NetFxReference Include="System.Core" />
- <NetFxReference Include="System.Data" />
- <NetFxReference Include="System.Drawing" />
- <NetFxReference Include="System.IO.Compression.FileSystem" />
- <NetFxReference Include="System.Net" />
- <NetFxReference Include="System.Numerics" />
- <NetFxReference Include="System.Runtime.Serialization" />
- <NetFxReference Include="System.Security" />
- <NetFxReference Include="System.ServiceProcess" />
- <NetFxReference Include="System.ServiceModel.Web" />
- <NetFxReference Include="System.Transactions" />
- <NetFxReference Include="System.Web" />
- <NetFxReference Include="System.Windows" />
- <NetFxReference Include="System.Xml" />
- <NetFxReference Include="System.Xml.Serialization" />
- <NetFxReference Include="System.Xml.Linq" />
- <NetFxReference Include="WindowsBase" />
- </ItemGroup>
-</Project>
diff --git a/src/libraries/shims/ref/Directory.Build.props b/src/libraries/shims/ref/Directory.Build.props
new file mode 100644
index 00000000000..bfad4de87ff
--- /dev/null
+++ b/src/libraries/shims/ref/Directory.Build.props
@@ -0,0 +1,8 @@
+<Project>
+ <Import Project="..\Directory.Build.props" />
+
+ <PropertyGroup>
+ <!-- Allow shim ref projects to reference source projects. -->
+ <SkipValidateReferenceAssemblyProjectReferences>true</SkipValidateReferenceAssemblyProjectReferences>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/ref/System.Data.csproj b/src/libraries/shims/ref/System.Data.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/ref/System.Data.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/ref/System.Xml.csproj b/src/libraries/shims/ref/System.Xml.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/ref/System.Xml.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/ref/System.csproj b/src/libraries/shims/ref/System.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/ref/System.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/ref/mscorlib.csproj b/src/libraries/shims/ref/mscorlib.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/ref/mscorlib.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/Directory.Build.props b/src/libraries/shims/src/Directory.Build.props
new file mode 100644
index 00000000000..5841ecb19f2
--- /dev/null
+++ b/src/libraries/shims/src/Directory.Build.props
@@ -0,0 +1,15 @@
+<Project>
+ <Import Project="..\Directory.Build.props" />
+
+ <PropertyGroup>
+ <ContractProject>$(MSBuildThisFileDirectory)..\ref\$(MSBuildProjectName).csproj</ContractProject>
+ <IsRuntimeAndReferenceAssembly Condition="!Exists('$(ContractProject)')">true</IsRuntimeAndReferenceAssembly>
+ </PropertyGroup>
+
+ <!-- Reference the contract project so that this project's ReferenceAssembly attribute points to the contract, as expected. -->
+ <ItemGroup Condition="'$(IsRuntimeAndReferenceAssembly)' != 'true'">
+ <ProjectReference Include="$(ContractProject)"
+ ReferenceOutputAssembly="false"
+ OutputItemType="ResolvedMatchingContractOverride" />
+ </ItemGroup>
+</Project>
diff --git a/src/libraries/shims/src/Microsoft.VisualBasic.csproj b/src/libraries/shims/src/Microsoft.VisualBasic.csproj
new file mode 100644
index 00000000000..46ce55f6fe7
--- /dev/null
+++ b/src/libraries/shims/src/Microsoft.VisualBasic.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>10.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.ComponentModel.DataAnnotations.csproj b/src/libraries/shims/src/System.ComponentModel.DataAnnotations.csproj
new file mode 100644
index 00000000000..ab1cdec3ed6
--- /dev/null
+++ b/src/libraries/shims/src/System.ComponentModel.DataAnnotations.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Configuration.csproj b/src/libraries/shims/src/System.Configuration.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.Configuration.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Core.csproj b/src/libraries/shims/src/System.Core.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.Core.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Data.csproj b/src/libraries/shims/src/System.Data.csproj
new file mode 100644
index 00000000000..d2d96b4f496
--- /dev/null
+++ b/src/libraries/shims/src/System.Data.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="System.Data.forwards.cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/libraries/shims/manual/System.Data.forwards.cs b/src/libraries/shims/src/System.Data.forwards.cs
index 53ce0c7c4b7..16a3a2c8bca 100644
--- a/src/libraries/shims/manual/System.Data.forwards.cs
+++ b/src/libraries/shims/src/System.Data.forwards.cs
@@ -3,8 +3,5 @@
// Add any internal types that we need to forward from System.Data.
-// These types are required for Desktop to Core serialization as they are not covered by GenAPI because they are not exposed in the ref assembly.
-#if NETCOREAPP
-// System.Data.Odbc is only supported on netcoreapp
+// These types are required for Desktop to Core serialization as they are not covered by GenFacades because they are not exposed in the ref assembly.
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Odbc.ODBC32))]
-#endif
diff --git a/src/libraries/shims/src/System.Drawing.csproj b/src/libraries/shims/src/System.Drawing.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.Drawing.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.IO.Compression.FileSystem.csproj b/src/libraries/shims/src/System.IO.Compression.FileSystem.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.IO.Compression.FileSystem.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Net.csproj b/src/libraries/shims/src/System.Net.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.Net.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Numerics.csproj b/src/libraries/shims/src/System.Numerics.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.Numerics.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Runtime.Serialization.csproj b/src/libraries/shims/src/System.Runtime.Serialization.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.Runtime.Serialization.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Security.csproj b/src/libraries/shims/src/System.Security.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.Security.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.ServiceModel.Web.csproj b/src/libraries/shims/src/System.ServiceModel.Web.csproj
new file mode 100644
index 00000000000..ab1cdec3ed6
--- /dev/null
+++ b/src/libraries/shims/src/System.ServiceModel.Web.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.ServiceProcess.csproj b/src/libraries/shims/src/System.ServiceProcess.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.ServiceProcess.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Transactions.csproj b/src/libraries/shims/src/System.Transactions.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.Transactions.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Web.csproj b/src/libraries/shims/src/System.Web.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.Web.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Windows.csproj b/src/libraries/shims/src/System.Windows.csproj
new file mode 100644
index 00000000000..b65b1ff9c70
--- /dev/null
+++ b/src/libraries/shims/src/System.Windows.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>Microsoft</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Xml.Linq.csproj b/src/libraries/shims/src/System.Xml.Linq.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.Xml.Linq.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Xml.Serialization.csproj b/src/libraries/shims/src/System.Xml.Serialization.csproj
new file mode 100644
index 00000000000..6d4156e41f4
--- /dev/null
+++ b/src/libraries/shims/src/System.Xml.Serialization.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/System.Xml.csproj b/src/libraries/shims/src/System.Xml.csproj
new file mode 100644
index 00000000000..b1ba3bbbb23
--- /dev/null
+++ b/src/libraries/shims/src/System.Xml.csproj
@@ -0,0 +1,8 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <!-- required in order to include runtime facade to obsoleted type System.Xml.IApplicationResourceStreamResolver -->
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/src/libraries/shims/src/System.csproj b/src/libraries/shims/src/System.csproj
new file mode 100644
index 00000000000..e11b22d3519
--- /dev/null
+++ b/src/libraries/shims/src/System.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="System.forwards.cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/src/libraries/shims/manual/System.forwards.cs b/src/libraries/shims/src/System.forwards.cs
index 7502705da1f..19fac75cffc 100644
--- a/src/libraries/shims/manual/System.forwards.cs
+++ b/src/libraries/shims/src/System.forwards.cs
@@ -3,7 +3,7 @@
// Add any internal types that we need to forward from System.
-// These types are required for Desktop to Core serialization as they are not covered by GenAPI because they are marked as internal.
+// These types are required for Desktop to Core serialization as they are not covered by GenFacades because they are marked as internal.
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.TreeSet<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.Compression.ZLibException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.CookieVariant))]
diff --git a/src/libraries/shims/src/WindowsBase.csproj b/src/libraries/shims/src/WindowsBase.csproj
new file mode 100644
index 00000000000..ab1cdec3ed6
--- /dev/null
+++ b/src/libraries/shims/src/WindowsBase.csproj
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
+ </PropertyGroup>
+</Project>
diff --git a/src/libraries/shims/src/mscorlib.csproj b/src/libraries/shims/src/mscorlib.csproj
new file mode 100644
index 00000000000..718cd1a3f18
--- /dev/null
+++ b/src/libraries/shims/src/mscorlib.csproj
@@ -0,0 +1,10 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>4.0.0.0</AssemblyVersion>
+ <StrongNameKeyId>ECMA</StrongNameKeyId>
+ <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="mscorlib.forwards.cs" />
+ </ItemGroup>
+</Project>
diff --git a/src/libraries/shims/manual/mscorlib.forwards.cs b/src/libraries/shims/src/mscorlib.forwards.cs
index 874380a6550..5598f5bf8f2 100644
--- a/src/libraries/shims/manual/mscorlib.forwards.cs
+++ b/src/libraries/shims/src/mscorlib.forwards.cs
@@ -3,7 +3,7 @@
// Add any internal types that we need to forward from mscorlib.
-// These types are required for Desktop to Core serialization as they are not covered by GenAPI because they are marked as internal.
+// These types are required for Desktop to Core serialization as they are not covered by GenFacades because they are marked as internal.
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.GenericComparer<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.NullableComparer<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ObjectComparer<>))]
diff --git a/src/libraries/shims/src/netstandard.csproj b/src/libraries/shims/src/netstandard.csproj
new file mode 100644
index 00000000000..cce47288ba6
--- /dev/null
+++ b/src/libraries/shims/src/netstandard.csproj
@@ -0,0 +1,13 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <AssemblyVersion>2.1.0.0</AssemblyVersion>
+ <StrongNameKeyId>Open</StrongNameKeyId>
+ </PropertyGroup>
+
+ <!-- Download the corresponding targeting pack to build against the contract. -->
+ <ItemGroup>
+ <PackageDownload Include="NETStandard.Library.Ref"
+ Version="[$(NETStandardLibraryRefVersion)]" />
+ <ResolvedMatchingContract Include="$(NETStandard21RefPath)$(MSBuildProjectName).dll" />
+ </ItemGroup>
+</Project>
diff --git a/src/libraries/src.proj b/src/libraries/src.proj
deleted file mode 100644
index f104c029c55..00000000000
--- a/src/libraries/src.proj
+++ /dev/null
@@ -1,92 +0,0 @@
-<Project Sdk="Microsoft.Build.Traversal">
-
- <PropertyGroup>
- <TraversalGlobalProperties>BuildAllProjects=true</TraversalGlobalProperties>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(BuildTargetFramework)' == 'net48'">
- <TargetFramework>$(BuildTargetFramework)</TargetFramework>
- <!-- Filter out ProjectReferences which aren't compatible with the above TargetFramework. -->
- <OmitIncompatibleProjectReferences>true</OmitIncompatibleProjectReferences>
- <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
- </PropertyGroup>
-
- <ItemGroup>
- <_allSrc Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
- Exclude="@(ProjectExclusions);
- $(MSBuildThisFileDirectory)*\src\**\*.shproj" />
- <!-- Build these packages which reference many other projects in the allconfigurations leg only. -->
- <_allSrc Remove="Microsoft.Internal.Runtime.AspNetCore.Transport\src\Microsoft.Internal.Runtime.AspNetCore.Transport.proj;
- Microsoft.Internal.Runtime.WindowsDesktop.Transport\src\Microsoft.Internal.Runtime.WindowsDesktop.Transport.proj;
- Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj"
- Condition="'$(BuildAllConfigurations)' != 'true'" />
-
- <!-- These projects do not need to be built during source-build. -->
- <_allSrc Remove="Microsoft.Extensions.DependencyInjection.Specification.Tests\src\Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj;
- Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj"
- Condition="'$(DotNetBuildFromSource)' == 'true'" />
-
- <NonNetCoreAppProject Include="@(_allSrc)"
- Exclude="@(NetCoreAppLibrary->'%(Identity)\src\%(Identity).csproj');
- $(MSBuildThisFileDirectory)Microsoft.VisualBasic.Core\src\Microsoft.VisualBasic.Core.vbproj" />
- <!-- During an official build, build the identity package only in the allconfigurations build, otherwise always. -->
- <NonNetCoreAppProject Include="$(MSBuildThisFileDirectory)*\pkg\runtime.native.*.proj" Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or '$(BuildAllConfigurations)' == 'true'" />
- <!-- During an official Build, build the rid specific package matching the OutputRid only outside of an allconfigurations build and only when targeting the CoreCLR runtime.
- The limitation on the CoreCLR runtime is entirely artificial but avoids duplicate assets being publish. -->
- <NonNetCoreAppProject Include="$(MSBuildThisFileDirectory)*\pkg\runtime.$(OutputRid).*.proj" Condition="'$(BuildingAnOfficialBuildLeg)' != 'true' or
- ('$(BuildAllConfigurations)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)')" />
-
- <NetCoreAppProject Include="$(CoreLibProject);
- @(_allSrc)"
- Exclude="@(NonNetCoreAppProject)" />
- <ManualShimProject Include="shims\manual\*.csproj" Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''" />
- <ApiCompatProject Include="apicompat\ApiCompat.proj"
- Condition="'$(DotNetBuildFromSource)' != 'true' and
- ('$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == '') and
- '$(RunApiCompat)' != 'false'" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="@(NetCoreAppProject)" />
-
- <!-- Restore only and build before/after. -->
- <ProjectReference Include="@(NonNetCoreAppProject);
- @(ManualShimProject);
- @(ApiCompatProject)"
- Condition="'$(MSBuildRestoreSessionId)' != ''" />
- </ItemGroup>
-
- <Target Name="BuildNonNetCoreAppProjects"
- AfterTargets="Build">
- <MSBuild Targets="Build"
- BuildInParallel="true"
- Projects="@(NonNetCoreAppProject)"
- Properties="$(TraversalGlobalProperties)" />
- </Target>
-
- <Target Name="BuildManualShims"
- AfterTargets="BuildNonNetCoreAppProjects"
- Condition="'@(ManualShimProject)' != ''">
- <MSBuild Targets="Build"
- Projects="@(ManualShimProject)"
- Properties="$(TraversalGlobalProperties)" />
- </Target>
-
- <Import Project="$(MSBuildThisFileDirectory)illink-trimassemblies.targets"
- Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''" />
-
- <Target Name="RunApiCompat"
- Condition="'@(ApiCompatProject)' != ''"
- AfterTargets="BuildManualShims">
- <MSBuild Targets="Build"
- Projects="@(ApiCompatProject)"
- Properties="$(TraversalGlobalProperties)" />
- </Target>
-
- <Target Name="SetAzureDevOpsVariableForBuiltPackages"
- Condition="'$(ContinuousIntegrationBuild)' == 'true'"
- AfterTargets="Build;Pack">
- <Message Condition="Exists('$(ArtifactsDir)packages')" Importance="High" Text="##vso[task.setvariable variable=_librariesBuildProducedPackages]true" />
- </Target>
-
-</Project>
diff --git a/src/libraries/testPackages/build/Directory.Build.props b/src/libraries/testPackages/build/Directory.Build.props
index d26162f97bd..b61b68b026e 100644
--- a/src/libraries/testPackages/build/Directory.Build.props
+++ b/src/libraries/testPackages/build/Directory.Build.props
@@ -5,5 +5,5 @@
</PropertyGroup>
<Import Project="Versions.props" />
- <Import Project="netfxreference.props" />
+ <Import Project="NetCoreAppLibrary.props" />
</Project>
diff --git a/src/libraries/testPackages/testPackages.proj b/src/libraries/testPackages/testPackages.proj
index c0924b462ec..a27484cc658 100644
--- a/src/libraries/testPackages/testPackages.proj
+++ b/src/libraries/testPackages/testPackages.proj
@@ -43,7 +43,7 @@
$(RepoRoot)NuGet.config;
$(RepositoryEngineeringDir)Versions.props;
$(RepositoryEngineeringDir)targetingpacks.targets;
- $(LibrariesProjectRoot)shims\netfxreference.props;
+ $(LibrariesProjectRoot)NetCoreAppLibrary.props;
build\packageTest.targets;
build\Directory.Build.props;
build\Directory.Build.targets"
diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj
index 133f62f029a..0aaa1549675 100644
--- a/src/libraries/tests.proj
+++ b/src/libraries/tests.proj
@@ -1,5 +1,12 @@
<Project Sdk="Microsoft.Build.Traversal">
+ <PropertyGroup Condition="'$(BuildAllConfigurations)' != 'true'">
+ <!-- Build for NetCoreAppCurrent by default if no BuildTargetFramework is supplied or if not all configurations are built. -->
+ <TargetFramework>$([MSBuild]::ValueOrDefault('$(BuildTargetFramework)', '$(NetCoreAppCurrent)'))-$(TargetOS)</TargetFramework>
+ <!-- Filter ProjectReferences to build the best matching target framework only. -->
+ <FilterTraversalProjectReferences>true</FilterTraversalProjectReferences>
+ </PropertyGroup>
+
<PropertyGroup>
<TestInParallel Condition="'$(Coverage)' == 'true'">false</TestInParallel>
<!-- For tests we want to continue running if a test run failed. -->
diff --git a/src/tests/Interop/IJW/getRefPackFolderFromArtifacts.ps1 b/src/tests/Interop/IJW/getRefPackFolderFromArtifacts.ps1
index 98242949f44..904f7ea3cb1 100644
--- a/src/tests/Interop/IJW/getRefPackFolderFromArtifacts.ps1
+++ b/src/tests/Interop/IJW/getRefPackFolderFromArtifacts.ps1
@@ -14,7 +14,7 @@ $refPackPath = "$repoRoot/artifacts/bin/ref/net$majorVersion.$minorVersion"
if (-not (Test-Path $refPackPath))
{
- Write-Error "Reference assemblies not found in the artifacts folder at '$refPackPath'. Did you build the libs.ref subset? Did the repo layout change?"
+ Write-Error "Reference assemblies not found in the artifacts folder at '$refPackPath'. Did you invoke 'build.cmd libs.sfx+libs.oob /p:RefOnly=true' to make sure that refs are built? Did the repo layout change?"
return 1
}