DotNetCoreMSBuildSettings.Verbose: Unknown switch
Executing task: Build
Executing: "C:/Program Files/dotnet/dotnet.exe" msbuild /property:Configuration=Release "./master/Lol.sln" --verbosity Minimal
Microsoft (R) Build Engine version 16.0.450+ga8dc7f1d34 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1001: Unknown switch.
Switch: --verbosity
It's inherited from DotNetCoreSettings
Common --verbosity was obsoleted in .NET Core 2.x, and removed in 2.1.4xx, so we should obsolete now with errror, and remove next version.
Reference discussion around it dotnet/cli#9165
--verbosity has been removed from the top-level and the few commands that do support it now make it clear the option is controlling the MSBuild verbosity.
We could replace the underlying functionality by setting the /Verbosity=Diagnostic. That would work regardless of version.
It's not been avail for 1 year, and didn't work as expected before that. So my vote is on obsolete :)
But we still want to be able to set Verbosity for MSBuild. What should we replace the obsoleted Verbosity with for DotNetCoreMSBuild? Verbosity2? 😄
Since DotNetCoreMSBuildSettings proxies parameters to MSBuild I would want this to be analog to how MSBuild command works
Could we obsolete in base and do a new property in DotNetCoreMSBuildSettings?
Maybe a MSBuildVerbosity enum as Vebosity is Cake verbosities which doesn't totally match MSbuild but instead gets translated by GetMSBuildVerbosity extension.
Or should we use Verbosity as MSBuildSettings does?
Or we can just keep it as it is and change how the DotNetCoreMSBuild runner does the mapping from settings class to arguments.
In my PR I removed the DotNetCoreMSBuildSettings.Verbosity and created MSBuildVerbosity thats used by both settings. Personally I don't think the DotNetCoreMSBuildSettings.Verbosity should stay in cake just for compatibiltiy reasons but I'm open to discuss this.