MsBuild and passing multiple CL options?

McCoder-9088 40 Reputation points
2023-03-27T20:00:13.5066667+00:00

Good day, hope everyone is doing well. I'm trying to pass multiple CL options in my MSBuild call and running into the dreaded C1083 error complaining about the 2 options I'm passing. How can I pass those 2 -p:ClOptions?

msbuild --% -t:Rebuild -p:RunCodeAnalysis=true -p:ClOptions="/analyze:log log.sarif;/analyze:log:compilerwarnings" -p:Configuration=Release Project1.sln

Thanks again for the help.

Windows for business Windows Client for IT Pros Devices and deployment Set up, install, or upgrade
Developer technologies Visual Studio Other
Community Center Not monitored
{count} votes

Accepted answer
  1. Viorel 122.5K Reputation points
    2023-03-29T01:37:33.8533333+00:00

    Did you try to use a space instead of “;”?

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. McCoder-9088 40 Reputation points
    2023-03-28T15:02:38.25+00:00

    Great hint with using a space as it worked. Thanks again

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.