开发者

MSBuild via command line with multiple ReferencePath

开发者 https://www.devze.com 2023-03-24 02:01 出处:网络
How do I pass multiple ReferencePath in MSBuild in the command line.I\'m currently using this MSBuild开发者_如何学Go /t:Rebuild \"Solution1.sln\" /p:ReferencePath=\"C:\\My Library 1\\obj\\Debug; C:\\

How do I pass multiple ReferencePath in MSBuild in the command line. I'm currently using this

MSBuild开发者_如何学Go /t:Rebuild "Solution1.sln" /p:ReferencePath="C:\My Library 1\obj\Debug; C:\My Library 2\obj\Debug"

MSBuild is returning an MSB1006 error. Take note that my reference paths have spaces in it.


Try escaping the semicolons as %3b

Try moving the quotes around the entire property expression, not just the values

/p:"Name=Value One;Value Two"


I had the same problem. This worked for me:

msbuild {{slnPath}} /t:rebuild /p:OutDir={{outputpath}} /p:Configuration=Release

Specify /p for every parameter


This wasn't working in powershell

msbuild C:\temp\project.sln /p:referencepath="C:\Checkout\References
\CRM 2011;C:\Checkout\References\Log4Net\4.0\release"

but works fine from an old fashioned cmd prompt.


No matter what I do, I can't seem to make it work using MSBuild. I now use DEVENVE.EXE to compile my solution; it would read my user project settings where the ReferencePath is saved and use that to locate the correct version of the DLL I want to use.


replacing the ';' with '3%B' seems to work in my setup with Nant and Jenkins

0

精彩评论

暂无评论...
验证码 换一张
取 消