diff --git a/eng/Subsets.props b/eng/Subsets.props
index 0674e93cf4ded7..f7d03633b15fe5 100644
--- a/eng/Subsets.props
+++ b/eng/Subsets.props
@@ -640,7 +640,10 @@
-
+
@@ -780,7 +783,9 @@
-
+
diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets
index e494ca933bdbea..0e650e92fffe8e 100644
--- a/eng/liveBuilds.targets
+++ b/eng/liveBuilds.targets
@@ -166,16 +166,25 @@
Ensure artifacts exist for the more advanced paths. If the configuration is '*', don't emit
these errors: it isn't a local dev scenario.
-->
-
+
+
+
+
+
@@ -185,10 +194,8 @@
-
+
+
+
+
+
+
+
@@ -373,6 +387,11 @@
+
+
+
+
+
+
+
+
+
+
-
+ <_NetCoreAppRefPackGeneratorRelatedFile Include="@(_NetCoreAppRefPackGeneratorFile)" />
+ <_NetCoreAppRefPackGeneratorRelatedFile Include="@(_NetCoreAppRefPackGeneratorFile->'%(RootDir)%(Directory)%(Filename).pdb')" />
+ <_NetCoreAppRefPackGeneratorRelatedFile Include="%(_NetCoreAppRefPackGeneratorFile.RootDir)%(_NetCoreAppRefPackGeneratorFile.Directory)*\%(_NetCoreAppRefPackGeneratorFile.Filename).resources.dll" />
+ <_NetCoreAppRefPackGeneratorRelatedFile Remove="@(_NetCoreAppRefPackGeneratorRelatedFile)"
+ Condition="!Exists('%(_NetCoreAppRefPackGeneratorRelatedFile.Identity)')" />
+ <_NetCoreAppLibraryPublicSourceAssembly Include="@(_NetCoreAppLibrarySourceAssembly)"
+ Condition="'%(_NetCoreAppLibrarySourceAssembly.Extension)' == '.dll' and '%(_NetCoreAppLibrarySourceAssembly.IsPrivateAssembly)' != 'true'" />
+ <_NetCoreAppLibrarySourceAssemblyWithReferenceAssembly Include="@(_NetCoreAppLibraryPublicSourceAssembly)"
+ Condition="'%(_NetCoreAppLibraryPublicSourceAssembly.ReferenceAssembly)' != ''" />
+ <_NetCoreAppLibraryReferenceAssembly Include="@(_NetCoreAppLibrarySourceAssemblyWithReferenceAssembly->Metadata('ReferenceAssembly'))" />
+ <_NetCoreAppLibraryReferenceAssembly Include="@(_NetCoreAppLibraryPublicSourceAssembly)"
+ Exclude="@(_NetCoreAppLibrarySourceAssemblyWithReferenceAssembly)" />
+ <_NetCoreAppLibraryReferenceAssemblySymbols Include="@(_NetCoreAppLibraryReferenceAssembly->'%(RootDir)%(Directory)%(Filename).pdb')" />
+ <_NetCoreAppLibraryReferenceAssemblySymbols Remove="@(_NetCoreAppLibraryReferenceAssemblySymbols)"
+ Condition="!Exists('%(_NetCoreAppLibraryReferenceAssemblySymbols.Identity)')" />
+
-
-
-
+ <_NetCoreAppLibrarySourceAssemblyWithDocumentation Include="@(_NetCoreAppLibraryPublicSourceAssembly)"
+ Condition="'%(_NetCoreAppLibraryPublicSourceAssembly.DocFileItem)' != '' and Exists('%(_NetCoreAppLibraryPublicSourceAssembly.DocFileItem)')" />
+
+
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj
index 5841a1ca33f320..1cbc5c78a0649f 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj
@@ -75,13 +75,16 @@
webcil-in-wasm R2R images under native/r2r/ for trimming and per-app R2R. -->
+ BeforeTargets="_PrepareForReadyToRunCompilation"
+ DependsOnTargets="ResolveProjectReferences;ResolveRuntimeFilesFromLocalBuild">
- <_WasmFrameworkR2RInput Include="$(LibrariesSharedFrameworkBinArtifactsPath)*.dll"
- Exclude="$(LibrariesSharedFrameworkBinArtifactsPath)*.resources.dll" />
+ <_WasmFrameworkR2RReference Include="@(_NetCoreAppLibrarySourceAssembly)"
+ Condition="'%(_NetCoreAppLibrarySourceAssembly.Extension)' == '.dll' and
+ '%(_NetCoreAppLibrarySourceAssembly.Filename)' != 'System.Private.CoreLib'" />
+ <_WasmFrameworkR2RInput Include="@(_WasmFrameworkR2RReference)" />
<_WasmFrameworkR2RInput Remove="@(_WasmFrameworkR2RInput)"
Condition="'$(WasmFrameworkR2RSubset)' != '' and !$([System.String]::Copy(';$(WasmFrameworkR2RSubset);').Contains(';%(FileName);'))" />
- <_WasmFrameworkR2RExclude Include="$(LibrariesSharedFrameworkBinArtifactsPath)*.dll"
+ <_WasmFrameworkR2RExclude Include="@(_WasmFrameworkR2RReference)"
Exclude="@(_WasmFrameworkR2RInput)" />
@@ -96,7 +99,7 @@
- <_ReadyToRunCompilerInputs Include="$(LibrariesSharedFrameworkBinArtifactsPath)*.dll;$(_WasmCoreLibIL)" />
+ <_ReadyToRunCompilerInputs Include="@(_WasmFrameworkR2RReference);$(_WasmCoreLibIL)" />
<_ReadyToRunCompilerInputs Include="$(Crossgen2InBuildDir)*jit*.dll;$(Crossgen2InBuildDir)*jit*.dylib;$(Crossgen2InBuildDir)*jit*.so" />
diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
index db017617784bac..2449e70a676069 100644
--- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
+++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
@@ -1,4 +1,22 @@
+
+
+
+
+
+
+
true
@@ -44,10 +62,18 @@
-
+
+ <_NetCoreAppLibraryRuntimeAssembly Include="@(_NetCoreAppLibrarySourceAssembly)"
+ Condition="'%(_NetCoreAppLibrarySourceAssembly.Extension)' == '.dll' and '%(_NetCoreAppLibrarySourceAssembly.Filename)' != 'System.Private.CoreLib'" />
+ <_NetCoreAppLibraryRuntimeAssemblySymbols Include="@(_NetCoreAppLibraryRuntimeAssembly->'%(RootDir)%(Directory)%(Filename).pdb')" />
+ <_NetCoreAppLibraryRuntimeAssemblySymbols Remove="@(_NetCoreAppLibraryRuntimeAssemblySymbols)"
+ Condition="!Exists('%(_NetCoreAppLibraryRuntimeAssemblySymbols.Identity)')" />
+
+ Condition="'%(LibrariesRuntimeFiles.Extension)' != '$(StaticLibSuffix)' or '$(IncludeStaticLibrariesInPack)' == 'true'">
runtimes/$(RuntimeIdentifier)/native/%(LibrariesRuntimeFiles.NativeSubDirectory)%(RecursiveDir)
diff --git a/src/libraries/NetCoreAppLibraryProjectReferences.props b/src/libraries/NetCoreAppLibraryProjectReferences.props
new file mode 100644
index 00000000000000..3e10e1020db71a
--- /dev/null
+++ b/src/libraries/NetCoreAppLibraryProjectReferences.props
@@ -0,0 +1,47 @@
+
+
+
+ <_NetCoreAppLibrariesRuntimeFlavor>$([MSBuild]::ValueOrDefault('$(LibrariesRuntimeFlavor)', '$(RuntimeFlavor)'))
+
+
+
+ <_NetCoreAppLibrarySourceProject Include="$(LibrariesProjectRoot)*\src\*.*proj"
+ Exclude="@(ProjectExclusions);
+ $(LibrariesProjectRoot)*\src\*.shproj" />
+ <_NonNetCoreAppLibrarySourceProject Include="@(_NetCoreAppLibrarySourceProject)"
+ Exclude="@(NetCoreAppLibrary->'$(LibrariesProjectRoot)%(Identity)\src\%(Identity).csproj');
+ $(LibrariesProjectRoot)Microsoft.VisualBasic.Core\src\Microsoft.VisualBasic.Core.vbproj" />
+
+ <_NetCoreAppLibraryShimProject Include="$(LibrariesProjectRoot)shims\*\src\*.csproj"
+ OriginalIdentity="%(Identity)" />
+ <_NetCoreAppLibraryShimProjectName Include="@(_NetCoreAppLibraryShimProject->Metadata('Filename'))" />
+ <_NonNetCoreAppLibraryShimProjectName Include="@(_NetCoreAppLibraryShimProjectName)"
+ Exclude="@(NetCoreAppLibrary)" />
+ <_IncludedNetCoreAppLibraryShimProjectName Include="@(_NetCoreAppLibraryShimProjectName)"
+ Exclude="@(_NonNetCoreAppLibraryShimProjectName)" />
+
+
+
+
+
+ <_NetCoreAppLibraryGeneratorProject Include="$(LibrariesProjectRoot)*\gen\**\*.*proj"
+ Exclude="@(ProjectExclusions)"
+ OriginalIdentity="%(Identity)" />
+ <_NetCoreAppLibraryGeneratorProjectName Include="@(_NetCoreAppLibraryGeneratorProject->Metadata('Filename'))" />
+ <_NonNetCoreAppLibraryGeneratorProjectName Include="@(_NetCoreAppLibraryGeneratorProjectName)"
+ Exclude="@(NetCoreAppLibraryGenerator)" />
+ <_IncludedNetCoreAppLibraryGeneratorProjectName Include="@(_NetCoreAppLibraryGeneratorProjectName)"
+ Exclude="@(_NonNetCoreAppLibraryGeneratorProjectName)" />
+
+
+
+
+
+
+
+
diff --git a/src/libraries/sfx-gen.proj b/src/libraries/sfx-gen.proj
index 1b3bdf6c104c8d..ac449c9c34fb42 100644
--- a/src/libraries/sfx-gen.proj
+++ b/src/libraries/sfx-gen.proj
@@ -7,17 +7,10 @@
true
-
+
+
-
-
-
-
-
+
diff --git a/src/libraries/sfx-src.proj b/src/libraries/sfx-src.proj
index 8da1f3b306c227..b2823831c9be8d 100644
--- a/src/libraries/sfx-src.proj
+++ b/src/libraries/sfx-src.proj
@@ -7,18 +7,10 @@
true
-
+
+
-
-
-
+
diff --git a/src/mono/browser/browser.proj b/src/mono/browser/browser.proj
index 710a36801a553b..b98e470596a40e 100644
--- a/src/mono/browser/browser.proj
+++ b/src/mono/browser/browser.proj
@@ -39,7 +39,7 @@
-
+
$(WasmObjDir)\pinvoke-table.h
$(WasmObjDir)\wasm_m2n_invoke.g.h
diff --git a/src/mono/wasi/wasi.proj b/src/mono/wasi/wasi.proj
index 66fcd6e7fe4b71..c8408670ee032b 100644
--- a/src/mono/wasi/wasi.proj
+++ b/src/mono/wasi/wasi.proj
@@ -17,7 +17,7 @@
-
+
$(WasiObjDir)\pinvoke-table.h
$(WasiObjDir)\wasm_m2n_invoke.g.h
diff --git a/src/tests/tracing/eventcounter/runtimecounters.csproj b/src/tests/tracing/eventcounter/runtimecounters.csproj
index 65765cf833dc31..11514bf23b6325 100644
--- a/src/tests/tracing/eventcounter/runtimecounters.csproj
+++ b/src/tests/tracing/eventcounter/runtimecounters.csproj
@@ -19,7 +19,7 @@
-->
diff --git a/src/tests/tracing/eventpipe/Directory.Build.targets b/src/tests/tracing/eventpipe/Directory.Build.targets
index fd50f939a9c55e..6f9eb6518aeba0 100644
--- a/src/tests/tracing/eventpipe/Directory.Build.targets
+++ b/src/tests/tracing/eventpipe/Directory.Build.targets
@@ -7,7 +7,7 @@
-->