dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.67k stars 1.06k forks source link

Provide an easy toggle to control if Satellite Assembly generation should be run #42865

Open baronfel opened 1 month ago

baronfel commented 1 month ago

Is your feature request related to a problem? Please describe.

When doing CI non-release builds generating satellite assemblies may not be necessary for some customers, instead taking up compilation time that could be saved. We should provide an easy toggle to skip generating satellite assemblies entirely for builds that are intended for smoke-checking, or other non-production use cases.

Today, skipping Satellite Assembly generation requires a relatively difficult workaround of explicitly setting WithCulture="false" on EmbeddedResource Items based on some user-specified Condition.

Other Techs

akoeplinger commented 1 month ago

Here's an example of the workaround roslyn has to do: https://github.com/dotnet/roslyn/blob/5989ba09c78c7b0934f79db9602dff8424f006fa/eng/targets/DoNotGenerateSatelliteAssemblies_Workaround.targets