I noticed some strange behaviour in the auto quoting of command line args for the DotNet Publish action. I am trying to pass assembly attribute values as properties to MSBuild via
dotnet publish. To set the copyright statement in the assemblies, I am using (more or less)
-p:Copyright=Copyright My Client Ltd. 2020 in the additional arguments field of the DotNet Publish action. Actually I was using an expression variable that evaluates to that, but the literal works as an MWE.
Continua appears to be auto quoting part of the argument such that the generated command string contains
-p:Copyright=Copyright "My Client Ltd. 2020". This leaves a stray token and causes
dotnet publish to throw ‘error MSB1008: Only one project can be specified’.
If I explicitly quote the property value
-p:Copyright="Copyright My Client Ltd. 2020" then I get
-p:Copyright="Copyright "My Client Ltd. 2020"" in the logged command, with the same result.
I can work around this by passing the properties as action-specific environment variables.