Skip to content

.NET 8: No longer build Windows-specific assets (except on Windows) #2901

@richlander

Description

@richlander

.NET has various construction challenges. One of them is that various product assets are multi-targeted for net4* targets, which we build, taking both time and space. The product would be faster to build and smaller if we did not build those targets. We should find a way to achieve that.

These assets are mostly (or entirely) unvaluable and unused. Also, today source-build targets Linux, where net4* is the least likely to be valuable.

Related: dotnet/sdk#16895

The .NET SDK enables building net4* assets. It adds a PackageReference to Microsoft.NETFramework.ReferenceAssemblies. We can continue to offer that. It is largely unrelated to this topic.

It would be useful to do three things:

  • Determine the cost of these assets, in built time and/or output size.
  • Validate the premise that these assets are unused/unvaluable.
  • Can we just target net8 and netstandard*. What scenarios require targeting other TFMs?

The initial findings is that removing .NET Framework targeting would:

  • Reduce source size by 3GB.
  • Reduce build time by TBD.
  • Reduce build output size by TBD.

@MichaelSimons @mmitche @jaredpar @omajid @tmds

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-product-experienceImprovements in the end-user's product experience

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions