acermate433s
acermate433s

Reputation: 2544

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.

Upvotes: 3

Views: 13771

Answers (5)

user206309
user206309

Reputation: 1

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

Upvotes: 0

Gokulnath
Gokulnath

Reputation: 1256

I had the same problem. This worked for me:

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

Specify /p for every parameter

Upvotes: 2

L1011
L1011

Reputation: 61

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.

Upvotes: 1

acermate433s
acermate433s

Reputation: 2544

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.

Upvotes: 0

Brian Kretzler
Brian Kretzler

Reputation: 9938

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"

Upvotes: 2

Related Questions