diff --git a/eng/generatorProjects.targets b/eng/generatorProjects.targets
new file mode 100644
index 00000000000000..93354fb90e69db
--- /dev/null
+++ b/eng/generatorProjects.targets
@@ -0,0 +1,38 @@
+
+
+
+ analyzers/dotnet
+ $(GeneratorProjectBaseTargetPath)/$(AnalyzerLanguage)
+
+
+
+
+
+
+
+
+ $(GeneratorProjectBaseTargetPath)
+
+
+
+
+
+ <_analyzerPath>analyzers/dotnet
+ <_analyzerPath Condition="'$(_analyzerPath)' != ''">$(_analyzerPath)/roslyn$(AnalyzerRoslynVersion)
+ <_analyzerPath Condition="'$(_analyzerPath)' != ''">$(_analyzerPath)/$(AnalyzerLanguage)
+
+
+
+ <_AnalyzerPackFile Include="@(_BuildOutputInPackage)" IsSymbol="false" />
+ <_AnalyzerPackFile Include="@(_TargetPathsToSymbols)" IsSymbol="true" />
+ <_AnalyzerPackFile PackagePath="$(_analyzerPath)/%(TargetPath)" />
+
+
+
+
+
+
diff --git a/eng/generators.targets b/eng/generators.targets
index ac01adc5cc4c4a..37fb3bd035cacc 100644
--- a/eng/generators.targets
+++ b/eng/generators.targets
@@ -9,23 +9,27 @@
+ - doesn't reference the targeting pack (i.e. when inbox) and
+ - references System.Private.CoreLib, or
+ - references System.Runtime.InteropServices -->
@@ -55,22 +59,21 @@
OutputItemType="" />
-
-
-
-
-
- true
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/eng/targetingpacks.targets b/eng/targetingpacks.targets
index 744a0cd20b469a..a6e6935f926ac3 100644
--- a/eng/targetingpacks.targets
+++ b/eng/targetingpacks.targets
@@ -146,5 +146,15 @@
Exclude="@(_targetingPackIncludedReferenceWithProjectName)" />
+
+
+ <_targetingPackAnalyzerReferenceWithProjectName Include="@(Analyzer->WithMetadataValue('ExternallyResolved', 'true')->Metadata('Filename'))"
+ OriginalIdentity="%(Identity)" />
+ <_targetingPackIncludedAnalyzerReferenceWithProjectName Include="@(_targetingPackAnalyzerReferenceWithProjectName)"
+ Exclude="@(_targetingPackReferenceExclusion)" />
+ <_targetingPackExcludedAnalyzerReferenceWithProjectName Include="@(_targetingPackAnalyzerReferenceWithProjectName)"
+ Exclude="@(_targetingPackIncludedAnalyzerReferenceWithProjectName)" />
+
+
diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets
index 8f9b52adb2805d..827d953abe6336 100644
--- a/src/libraries/Directory.Build.targets
+++ b/src/libraries/Directory.Build.targets
@@ -86,7 +86,7 @@
-
+
@@ -95,9 +95,6 @@
$(LibrariesAllBinArtifactsPath)
-
-
$(NetCoreAppCurrentTestHostSharedFrameworkPath)
@@ -110,8 +107,6 @@
$(MicrosoftNetCoreAppRefPackRefDir)
$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)
-
-
@@ -125,6 +120,7 @@
+
@@ -216,23 +212,4 @@
-
-
-
- <_analyzerPath>analyzers/dotnet
- <_analyzerPath Condition="'$(AnalyzerRoslynVersion)' != ''">$(_analyzerPath)/roslyn$(AnalyzerRoslynVersion)
- <_analyzerPath Condition="'$(AnalyzerLanguage)' != ''">$(_analyzerPath)/$(AnalyzerLanguage)
-
-
-
- <_AnalyzerPackFile Include="@(_BuildOutputInPackage)" IsSymbol="false" />
- <_AnalyzerPackFile Include="@(_TargetPathsToSymbols)" IsSymbol="true" />
- <_AnalyzerPackFile PackagePath="$(_analyzerPath)/%(TargetPath)" />
-
-
-
-
diff --git a/src/libraries/System.Memory.Data/tests/System.Memory.Data.Tests.csproj b/src/libraries/System.Memory.Data/tests/System.Memory.Data.Tests.csproj
index a2eb4ed1d562c2..22f772aff4d85a 100644
--- a/src/libraries/System.Memory.Data/tests/System.Memory.Data.Tests.csproj
+++ b/src/libraries/System.Memory.Data/tests/System.Memory.Data.Tests.csproj
@@ -12,8 +12,4 @@
-
-
-
-
diff --git a/src/libraries/System.Net.Http.Json/tests/FunctionalTests/System.Net.Http.Json.Functional.Tests.csproj b/src/libraries/System.Net.Http.Json/tests/FunctionalTests/System.Net.Http.Json.Functional.Tests.csproj
index 144cbb55fd2b63..9c13777b94aa9a 100644
--- a/src/libraries/System.Net.Http.Json/tests/FunctionalTests/System.Net.Http.Json.Functional.Tests.csproj
+++ b/src/libraries/System.Net.Http.Json/tests/FunctionalTests/System.Net.Http.Json.Functional.Tests.csproj
@@ -2,15 +2,18 @@
$(NetCoreAppCurrent);net48
+
-
+
+
+
@@ -21,11 +24,9 @@
-
+
+
-
-
-
diff --git a/src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System.Private.Runtime.InteropServices.JavaScript.Tests.csproj b/src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System.Private.Runtime.InteropServices.JavaScript.Tests.csproj
index e7643c86db59b3..f82405561d94b4 100644
--- a/src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System.Private.Runtime.InteropServices.JavaScript.Tests.csproj
+++ b/src/libraries/System.Private.Runtime.InteropServices.JavaScript/tests/System.Private.Runtime.InteropServices.JavaScript.Tests.csproj
@@ -25,7 +25,5 @@
-
-
diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj
index e5e80df11f2b81..e9fad601544352 100644
--- a/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj
+++ b/src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System.Runtime.InteropServices.JavaScript.Tests.csproj
@@ -16,9 +16,4 @@
-
-
-
-
-
diff --git a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Microsoft.Interop.LibraryImportGenerator.props b/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Microsoft.Interop.LibraryImportGenerator.props
deleted file mode 100644
index 14caceaf8e4d2e..00000000000000
--- a/src/libraries/System.Runtime.InteropServices/gen/LibraryImportGenerator/Microsoft.Interop.LibraryImportGenerator.props
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.TestLibrary/System.Text.Json.TestLibrary.targets b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.TestLibrary/System.Text.Json.TestLibrary.targets
index 619b27e3d05b53..f4b8bd9d504e63 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.TestLibrary/System.Text.Json.TestLibrary.targets
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.TestLibrary/System.Text.Json.TestLibrary.targets
@@ -2,11 +2,14 @@
netstandard2.0
+
-
+
+
-
+
+
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets
index 1b9e0d17b199e8..d3baa43706b8dd 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets
@@ -113,6 +113,7 @@
+
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj
index 749f6364889bac..baa21b1307ec79 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj
@@ -253,7 +253,4 @@
-
-
-
diff --git a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj
index 5965d053f1886b..92e08e241c9622 100644
--- a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj
+++ b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/System.Text.RegularExpressions.Tests.csproj
@@ -12,7 +12,6 @@
4.4.0-1.22356.23
-
@@ -74,7 +73,6 @@
-
diff --git a/src/libraries/frameworklist.targets b/src/libraries/frameworklist.targets
index 6e1966fe424540..103581037f512a 100644
--- a/src/libraries/frameworklist.targets
+++ b/src/libraries/frameworklist.targets
@@ -15,6 +15,8 @@
@(SharedFrameworkAssemblyWithoutReferenceAssembly)"
TargetPath="ref/$(NetCoreAppCurrent)"
Condition="!$(NetCoreAppLibraryNoReference.Contains('%(Filename);'))" />
+
@@ -22,7 +24,7 @@
@@ -34,7 +36,7 @@
diff --git a/src/libraries/oob.proj b/src/libraries/oob.proj
index 29594462f92b0d..12e150166d93f5 100644
--- a/src/libraries/oob.proj
+++ b/src/libraries/oob.proj
@@ -7,6 +7,7 @@
+
@@ -22,6 +23,7 @@
+
diff --git a/src/libraries/sfx.proj b/src/libraries/sfx.proj
index bfe5a1c4902232..ddd192227b71bf 100644
--- a/src/libraries/sfx.proj
+++ b/src/libraries/sfx.proj
@@ -11,12 +11,12 @@
SharedFrameworkAssembly
+
-
diff --git a/src/mono/sample/mbr/browser/WasmDelta.csproj b/src/mono/sample/mbr/browser/WasmDelta.csproj
index 8e53e4627eabaa..7769afa38dd895 100644
--- a/src/mono/sample/mbr/browser/WasmDelta.csproj
+++ b/src/mono/sample/mbr/browser/WasmDelta.csproj
@@ -57,9 +57,4 @@
-
-
-
-
-
diff --git a/src/mono/sample/wasm/Directory.Build.props b/src/mono/sample/wasm/Directory.Build.props
index 7382a6e5ce8f07..1135c05c79723e 100644
--- a/src/mono/sample/wasm/Directory.Build.props
+++ b/src/mono/sample/wasm/Directory.Build.props
@@ -31,12 +31,6 @@
true
-
-
-
-
-
-
diff --git a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj
index c6977c5f2d0407..e8641eb7442dfe 100644
--- a/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj
+++ b/src/mono/wasm/debugger/tests/debugger-test/debugger-test.csproj
@@ -103,8 +103,6 @@
-
-