mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
* Add NetCoreAppCurrent rid agnostic tfm to libs This change adds a NetCoreAppCurrent rid-less configuration which throws a PNSE to the following libraries: - System.Console - System.IO.Compression.ZipFile - System.IO.Compression - System.IO.FileSystem.DriveInfo - System.IO.MemoryMappedFiles - System.Net.Http - System.Net.Mail - System.Net.NameResolution - System.Net.Primitives - System.Net.Requests - System.Net.WebSockets System.Private.Runtime.InteropServices.JavaScript is excluded from that list as it doesn't have a contract and hence can't generate a PNSE assembly. Also it's currently a private assembly. These are the only libraries that were missing a RID agnostic tfm. Adding rid-less configurations, even if they just throw PNSEs helps with: - Platform enablement, i.e. a new "base" platforms like "Browser" usually require libraries that are RID specific to support them. By offering a RID agnostic PNSE tfm, projects can gradually support new platforms. - Making it possible to have ProjectReferences between libraries, i.e. imagine an microsoft.build.notargets / microsoft.build.traversal project with a `$(NetCoreAppCurrent)-$(TargetOS)` tfm which P2Ps all source projects. NuGet can't know that a $(NetCoreAppCurrent)-Linux tfm can reference a project with a $(NetCoreAppCurrent)-Unix tfm and will throw during restore, more precisely during the compatibility check. Ideally NuGet or the SDK would support targeting platforms from the runtime.json RID graph, including its compatiblity matrix but that isn't the case today. Even though the added tfms add to the build, I have other changes in the pipeline which depend on this one which will make the build noticeably faster. * Use default impl for DriveInfo & ZipFile