I am migrating a few solutions into azure devops and want to use the MSBuild Task to build them.
The are currently build using devenv with the following commands:
devenv.com file.vcxproj /rebuild "unittest debug" /project project_name
I thought I would try with
msbuild.exe file.vcxproj /p:Project=project_name /p:configuration="unittest debug"
But I am getting the error that the project does not contains the "unittest debug"
I would appreaciate any help I could get.
Thanks for reading,
The
devenvcommand line you are using doesn't make complete sense.file.vcxprojis a C++ project. If it were a solution, e.g.somesolution.sln, then the/projectswitch would make sense, e.g. ifsomesolution.slnincludedfile.vcxprojthen the following command would buildfile.vcxproj.Solutions and projects have a 'configuration' and a 'platform'.
"unittest debug"looks like an attempt to specify this information but the syntax is not correct. The correct syntax is<configuration>|<platform>
The default configuratuion values are
DebugandRelease.I suspect that
"unittest debug"should be
"debug|unittest".The original devenv command line can probably be rewritten as
The MSBuild equivalent is
The
/build,/clean, and/rebuildswitches ondevenvmap to MSBuild targets in the C++ project. The C++ project also expects configuration and platform as separate properties.