Skip to content

Define policy for usage of source-built system packages #1798

Closed

Description

@dseefeld

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)

Activity

  1. dagood commented on Oct 12, 2020

    @dagood
    Member

    Related:

    (I also edited to fix net50 to net5.0. 5.0 adds the . to let us count to 10. 😮)

  2. dseefeld commented on Oct 22, 2020

    @dseefeld
    ContributorAuthor

    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.

  3. dseefeld commented on Oct 27, 2020

    @dseefeld
    ContributorAuthor

    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.

    1. Update consumer's TFM to build only the TFM supported by the consumed package.
    2. Change the version of the consumed package to one built in source-build-reference-packages.
    3. Build System.* packages for all configurations. See Build runtime repo using --allconfigurations #1838

    The 3rd option would be best, but until that is added, options 1 or 2 are the best options.

  4. MichaelSimons commented on Oct 20, 2022

    @MichaelSimons
    Member

    [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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-buildImprovements in source-build's own build process

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions