Sunday, January 14, 2007

Say you have the following directory structure:

DirStructure

To compile all projects under the src directory you can use the following code:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <ProjectFiles Include="C:\YourApplicationFolder\src\**\*.csproj" />
  </ItemGroup>

  <Target Name="Compile">
    <MSBuild Projects="@(ProjectFiles)" />
  </Target>
</Project>
This will loop through all the folders and build each project file. Since MSBuild automatically resolves dependencies between projects, it will build everything in the correct order.
Sunday, January 14, 2007 6:12:42 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: