Reputation: 23
I'm an intern and have created an msbuild project that builds all of the .csproj files in the repository. Now I have to create a batch file that calls the msbuild.csproj I made and execute it on a daily schedule (say every day at 12:00pm). I don't know how to make a batch file and need some help getting started.
Upvotes: 2
Views: 9946
Reputation: 27842
Place this in a .bat file:
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v3.5
REM perhaps you need a different framework? %WINDIR%\Microsoft.NET\Framework\v4.0.30319
call %msBuildDir%\msbuild /target:AllTargetsWrapper "MySolutionOrCsProj.sln" /p:Configuration=Debug;FavoriteFood=Twix /l:FileLogger,Microsoft.Build.Engine;logfile=ZZZZZMSBuildSetupAndBuildAllTargetsWrapper_Debug.log
set msBuildDir=
You'll have to adjust the target name.
Wait, I just remembered I answered this before in more detail. See:
Build Visual Studio project through the command line
Upvotes: 7