You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define policy for usage of source-built system packages #1798
Source-build System.* packages built in runtime are only built for one TFM (i.e. net5.0 in the 5.0 build). When using these packages in a tarball build, complications arise when trying to build using these source-built packages. A policy needs to be defined to decide how to handle these situations
An example: roslyn/src/Compilers/Server/VBCSCompiler.csproj builds with TFMs netcoreapp3.1 and net472 and it uses a reference to System.Collections.Immutable. In the standard roslyn build, this reference is supplied by a preview8 version of this package which has previously been built and contains assemblies for both TFMs.
In a tarball build for this same project, the version of System.Collections.Immutable is supplied via Package Flow and is an RC1 version of the package built from source. This package only contains a net5.0 TFM. Because of this, building the project for net472 fails to find a valid assembly in the package and so fails the build.
Potential solutions:
Only build the project for netcorapp3.1
Use a reference package for the System.Collections.Immutable reference (this solution has other ramifications with cascading dependencies on other packages)
Investigation has been done on including --allconfigurations to the runtime build. This is the desired solution, but there are some issues with including that at this point.
As mentioned above, there are 3 potential solutions when encountering an issue building with a System.* source-built package that only builds for one TFM.
Update consumer's TFM to build only the TFM supported by the consumed package.
Change the version of the consumed package to one built in source-build-reference-packages.
Activity
dagood commentedon Oct 12, 2020
Related:
(I also edited to fix
net50tonet5.0. 5.0 adds the.to let us count to 10. 😮)dseefeld commentedon Oct 22, 2020
Investigation has been done on including --allconfigurations to the runtime build. This is the desired solution, but there are some issues with including that at this point.
dseefeld commentedon Oct 27, 2020
As mentioned above, there are 3 potential solutions when encountering an issue building with a System.* source-built package that only builds for one TFM.
The 3rd option would be best, but until that is added, options 1 or 2 are the best options.
MichaelSimons commentedon Oct 20, 2022
[Triage] net4* TFMs are being removed with #3014. In .NET 8.0 timeframe there is a goal to target the current TFM or a netstandard tfm.