Make target run at solution level in MSBuild

I need a set of tasks that need to be performed exactly once for the whole solution. This will launch tasks that will modify each project to run a separate set of tasks for each project. We did this earlier, using a separate project for the solution, on which there were tasks of the solution level, but we want to move away from this. Has anyone done this, or does anyone have suggestions on how to implement this?

+7
msbuild
source share
1 answer

Because Solution files are not in MSBuild format, they are not easy to expand or configure. If you want more control over the build process, you will have to create the msbuild "driver" file, which will replace your solution file. Inside this driver file, you must collect all the projects you need and complete some additional tasks. You would do it using a task

So, in your case, you simply complete the tasks before you build projects. Also note that I have set true to BuildInParallel , indicating that MSBuild may try to build several projects at once.

+6
source share

All Articles