Build the shim assemblies as part of libs.sfx (#89005)
authorViktor Hofer <viktor.hofer@microsoft.com>
Tue, 18 Jul 2023 15:24:35 +0000 (17:24 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Jul 2023 15:24:35 +0000 (17:24 +0200)
commitf2fa05761d38ec8b81aa66331a39aea497ae20a3
treeaccbc937716e7f79c1d6b450b47b14e5d1892812
parent0fce03e6bb0251f6e5d8abacd97d90f0a1a200f9
Build the shim assemblies as part of libs.sfx (#89005)

* Build the shim assemblies as part of libs.sfx

The shims build was intentionally kept out of the libs.sfx subset as
some shims reference out-of-band assemblies that also need to be built.

Since that change was made, the shim assemblies now don't reference all out-of-band
assemblies by default anymore and instead use fine grained dependencies.
Because of that, the number of out-of-band projects referenced and built
as part of the shims build is much smaller (~10 projects).

This fixes issues with ouf-of-band source generators not being able to
target the live targeting pack. These source generators need the shims
(more precisely the netstandard.dll shims) as some of the referenced
Microsoft.CodeAnalysis packages don't provide a .NETCoreApp assembly.

* Add fake assemblies for out-of-band type forward destinations

* Fix issues with nested classes and wrong type destinations

* Disable binplacing

* Make stubs private

* Disable symbols for stubs

* Add build protection to validate API compatibility of shims
51 files changed:
src/libraries/Directory.Build.targets
src/libraries/System.Windows.Extensions/ref/System.Windows.Extensions.csproj
src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj
src/libraries/apicompat/ApiCompat.proj
src/libraries/frameworklist.targets [deleted file]
src/libraries/oob.proj
src/libraries/sfx-ref.proj
src/libraries/sfx-src.proj
src/libraries/sfx.proj
src/libraries/shims.proj [deleted file]
src/libraries/shims/Directory.Build.targets [deleted file]
src/libraries/shims/System.Configuration/src/System.Configuration.csproj
src/libraries/shims/System.Core/src/System.Core.csproj
src/libraries/shims/System.Data/Directory.Build.props
src/libraries/shims/System.Data/ref/System.Data.csproj
src/libraries/shims/System.Data/src/System.Data.csproj
src/libraries/shims/System.Drawing/src/System.Drawing.csproj
src/libraries/shims/System.Net/src/System.Net.csproj
src/libraries/shims/System.Runtime.Serialization/src/System.Runtime.Serialization.csproj
src/libraries/shims/System.Security/src/System.Security.csproj
src/libraries/shims/System.ServiceModel.Web/src/System.ServiceModel.Web.csproj
src/libraries/shims/System.ServiceProcess/src/System.ServiceProcess.csproj
src/libraries/shims/System.Transactions/src/System.Transactions.csproj
src/libraries/shims/System/ref/System.csproj
src/libraries/shims/System/src/System.csproj
src/libraries/shims/WindowsBase/src/WindowsBase.csproj
src/libraries/shims/mscorlib/ref/mscorlib.csproj
src/libraries/shims/mscorlib/src/mscorlib.csproj
src/libraries/shims/stubs/Directory.Build.props [new file with mode: 0644]
src/libraries/shims/stubs/Directory.Build.targets [new file with mode: 0644]
src/libraries/shims/stubs/Microsoft.Win32.SystemEvents.csproj [new file with mode: 0644]
src/libraries/shims/stubs/README.md [new file with mode: 0644]
src/libraries/shims/stubs/System.CodeDom.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Configuration.ConfigurationManager.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Data.Odbc.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Data.OleDb.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Data.SqlClient.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Diagnostics.EventLog.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Diagnostics.PerformanceCounter.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Drawing.Common.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.IO.Packaging.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.IO.Ports.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Runtime.Serialization.Schema.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Security.Cryptography.Pkcs.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Security.Cryptography.ProtectedData.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Security.Cryptography.Xml.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Security.Permissions.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.ServiceModel.Syndication.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.ServiceProcess.ServiceController.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Threading.AccessControl.csproj [new file with mode: 0644]
src/libraries/shims/stubs/System.Windows.Extensions.csproj [new file with mode: 0644]