How to invoke MSBuild from PowerShell using & operator?

Ugh.

$collectionOfArgs = @("C:\some\project\or\other\src\Solution.sln", 
    "/target:Clean", "/target:Build")
& $msbuild $collectionOfArgs

This works. & takes a collection of arguments, so you must split up strings containing multiple arguments into a collection of string arguments.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)