views:

30

answers:

1

I need to build a batch file that runs on a directory and digs inside for suitable c# projects to compile. (and compile them of course).

I don't know the name of the projects inside the directory.

I can assume all project are in c# and written in VS2008 and above (if that helps).

I could really use your help on this, thanks.

+4  A: 
setlocal
SET CMD= msbuild.exe 

for /R %%d in (*.csproj) do %CMD% %%d
endlocal

This will build each project into individual assemblies, with all default build properties for each project. You can specify additional properties, or an MSBuild config file to use.

KeithS
Where do I put the path to the project? (For instance, it sits at c:\projects)
Faruz
You can add a CD command to c:\projects, or put the batch file there.
KeithS