Reputation: 9959
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).
Upvotes: 1
Views: 124
Reputation: 71565
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.
Upvotes: 3