Random Noise

cat /dev/random >> /dev/dsp

MSBuild Task: Solution and Project dependencies

leave a comment »

Few months ago I needed to use MSbuild to build solution. Sounds simple right? Yeah, but not quite.
Somehow, my msbuild failed with project dependency issues. It turns out that MSBuild doesn’t respect project dependencies in a solution. Google “msbuild solution dependencies” and you’ll find various post complaining about the problem with MSBuild.

I modified the MSBuild task found here to get projects in a solution file in dependency order.

You can then call the task to get the projects and compile them in order:

<Target Name="BuildProjects">
		<GetProjecsInOrder Solution="$(MSBuildProjectDirectory)\MySolution.sln">
		  <Output ItemName="ProjectFiles" TaskParameter="Output"/>

		<MSBuild Projects="%(ProjectFiles.FullPath)"

You can download the modified source from http://www.esnips.com/doc/8e232db4-21ac-4d93-90dc-2a8bc4db34a8/MSBuildTasks


Written by Vivek Unune

December 16, 2009 at 8:50 pm

Posted in .NET

Tagged with

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: