Amit Raz
Amit Raz

Reputation: 5534

MsBuild can't find lib

I am using the following script to build a C++ project:

msbuild D:\proj.vcxproj /p:Configuration="Release" /p:Platform="x64" /p:BuildProjectReferences=false /p:AssemblySearchPaths="D:\Import\GenericAIC\Include" /p:AdditionalLibPaths="D:\Export\Release"

I am getting an error that it can't find a certain lib. that lib is present in the D:\Export\Release folder which is set as p:AdditionalLibPaths

The project compiles perfectly in Visual studio.

Any thoughts?

Upvotes: 1

Views: 434

Answers (1)

Gilad
Gilad

Reputation: 6595

Since you are building a project and not a solution,
you don't have the $SolutionDir, and MSBuild cant interpert all the macros in the project file.
you just need to add /Property:SolutionDir="" and everything will compile.

Upvotes: 1

Related Questions