How to MsBuild for certain project

156 views
Skip to first unread message

Ziv Margolin

unread,
Oct 27, 2016, 5:55:08 AM10/27/16
to Jenkins Users
Hi all
I got a c++ solution, solution includes 2 directories with projects.

demo.sln -> dir1->p1

I am interested make a build only for one specific project (p1).

How can i o that ?



Thanks 

Slide

unread,
Oct 27, 2016, 7:34:46 AM10/27/16
to Jenkins Users
This sound like a question for the Microsoft folks instead. Lookup how to do this in the msdn documents.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/98b58fb5-9211-4115-8ee7-86204644e05c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jer...@bodycad.com

unread,
Oct 27, 2016, 3:33:48 PM10/27/16
to Jenkins Users
msbuild subfolder/myproject.vcxproj /t:build /p:Configuration="Release";Platform="x64";SolutionDir=MyPathToSln\

Make sure you don't use any absolute or relative path to the project, try to use path with $(SolutionDir)\MyPathToRessource and specify your path according to the provided SolutionDir from command line. This will save you a lot of problems in the long run. Also note the ending backslash for SolutionDir to help you with the difference between VS and MSBuild problem since VS always add it.

This will make it possible to use msbuild to build your project. Take great care with your references, since Visual Studio make many addin on the fly and things may work into Visual Studio and not into MSBuild. But modification for MSBuild are always a good thing for clean solution/project/dependencies anyway.

After that you can launch your msbuld command from Jenkins like any other cmd

also if you want to build (clean too) that project alone :
/p:BuildProjectReferences=false

If you need to make difference between the MSBuild and VS you can use the following variable into your conditions:
$(BuildingInsideVisualStudio)


 
Reply all
Reply to author
Forward
0 new messages