当前位置: 动力学知识库 > 问答 > 编程问答 >

MSBuild via command line with multiple ReferencePath

问题描述:

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

MSBuild /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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: