I am trying to pass a simple variable passing,
No parameter
msbuild MySolution.sln /p:Configuration=Debug /p:Platform="Any CPU"
Try 1
$buildOptions = '/p:Configuration=Debug /p:Platform="Any CPU"'
msbuild MySolution.sln + $buildOptions
-> cause MSB1008
Try 2
$command = "msbuild MySolution.sln" + $buildOptions
Invoke-expression $command
-> cause MSB1009
I tried the solution on this post but I think it is a different error.