Open JanKrivanek opened 1 month ago
Adding to team triage to decide priority.
I changed the title as there are a set of .net cli commands that we do not want the customer to have visibility into how it's implemented and there's no reason to expose the MSBuild usage. Potentially, we might even want to suppress env processing in MSBuild but perhaps that's a step too far.
Either way, we'd want a way to get this back in case we need it for diagnostics in the future. moving to net10.
Baronfel: In the simplest form, it might be as easy as setting a few more properties here where we call MSBuild on the projects: https://github.com/dotnet/sdk/blob/8634876e54cb129ae59728ea87c1990bc88b3f35/src/Cli/dotnet/commands/dotnet-workload/restore/WorkloadRestoreCommand.cs#L77-L80 WorkloadRestoreCommand.cs dotnet/sdk
e.g. TreatWarningsAsErrors, "false"
Context
This is followup on https://github.com/dotnet/msbuild/issues/10468 Adding
/p:NoWarn=MSB3982
todotnet workload restore
is ignored - it's not passed through to msbuild. Ideally the parameter would be flagged as not supported, or otherwise passed through to msbuild