Incremental build for solution
- Hi All,
Problem: For example, I have 20-30 projects in one solution.I'd like to build solution but as an incremental build, without rebuild all projects but only updated.And I'd like to use the task with calling a solution file, like thisbut not explicitly looping through the projects files.<Target Name="BuildSolutions" Condition="@(Solution)!=''"> <Exec Command="DevEnv "%(Solution.path)\%(Solution.Identity).sln" /Build $(SolutionBuildConfiguration)"/> </Target>
Is it possible?When I use a command "Build Solution" from the VS it makes an incremental build. But when I try to use the MSBuild with above target I always got the full build.Where is my mistake?Thanks!
Leonid Ganeline [BizTalk MVP] My BizTalk blog
Answers
Hi Leonid,
You could check this article on MSBuild Team Blog: How would you spend $100 on MSBuild?
As it said:
3) Support for other Microsoft project types that aren't yet in MSBuild format: Deployment/MSI (.vdproj), SQL Reporting (.rptproj), Biztalk (.btproj), Speech server (.prproj) etc -- whether currently supported by a VS project system or not. This is essentially a process of internal evangelization and encouragement for us.
Currently these project files are not transformed to MSBuild format, I believe all the projects will support MSBuild in the feature, such as VC++ project has done this modification in VS2010.
Sincerely,
Wesley
Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byLeonid GanelineMVPTuesday, November 03, 2009 4:13 PM
All Replies
Hi Leonid,
I tried your script file on my VS2008 + .NET Framework 3.5 machine with a simple solution which contains a C# console project and a library project, it will skip all the “up-to-date” projects as VS IDE does.
Could you please tell me what kinds of project your solution containing? are there any dependencies between them? and what’s the version of your .NET Framework? Some types of project are not supported by MSBuild currently, such as the Setup, BizTalk projects, and the dependencies might also cause difference, so I need more detail information to reproduce your problem.
Some suggestions:
1. What if you type: devenv /build Debug xxx.sln directly in the command line?
2. As I know, DevEnv calling MSBuild internally, you could also try calling MSBuild in the Exec task directly, it’s the recommended way to build projects in a target:
<Exec Command=”msbuild %(Solution.path)\%(Solution.Identity).sln” />
By the way, for every target, MSBuild compare the timestamps of the input files with the timestamps of the output files and determine whether to skip, build, or partially rebuild a target. You could get the details here: How to: Build Incrementally
Regards,
Wesley
Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Hi Wesley,
Thank you for help!
Yes, most of the projects are the BizTalk projects. Seems this is the source of my problem.
Where I can see the list of the project types, that MSBuild is not supported? Why they are not supported?
Leonid Ganeline [BizTalk MVP] My BizTalk blog Hi Leonid,
You could check this article on MSBuild Team Blog: How would you spend $100 on MSBuild?
As it said:
3) Support for other Microsoft project types that aren't yet in MSBuild format: Deployment/MSI (.vdproj), SQL Reporting (.rptproj), Biztalk (.btproj), Speech server (.prproj) etc -- whether currently supported by a VS project system or not. This is essentially a process of internal evangelization and encouragement for us.
Currently these project files are not transformed to MSBuild format, I believe all the projects will support MSBuild in the feature, such as VC++ project has done this modification in VS2010.
Sincerely,
Wesley
Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer byLeonid GanelineMVPTuesday, November 03, 2009 4:13 PM


