Skip to content

Instantly share code, notes, and snippets.

@marcofranssen
Last active December 16, 2015 13:58
Show Gist options
  • Save marcofranssen/5445092 to your computer and use it in GitHub Desktop.
Save marcofranssen/5445092 to your computer and use it in GitHub Desktop.
Gists belonging to my CI with Jenkins, MSBuild Nuget and Git part 1 blogpost http://marcofranssen.nl/ci-with-jenkins-msbuild-nuget-and-git-part-1/
@echo off
setlocal
set msbuild="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe"
set /p configChoice=Choose your build configuration (Debug = d, Release = r? (d, r)
if /i "%configChoice:~,1%" EQU "D" set config=Debug
if /i "%configChoice:~,1%" EQU "R" set config=Release
%msbuild% _ci.msbuild /nologo /m /v:m /t:Compile /p:Configuration=%config%
pause
endlocal
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Compile">
<PropertyGroup>
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
<DefineSolutionProperties>false</DefineSolutionProperties>
<!-- General Paths -->
<RootPath>$(MSBuildProjectDirectory)</RootPath>
<SrcPath>$(RootPath)\src</SrcPath>
<ReportsPath>$(RootPath)\reports</ReportsPath>
<ToolsPath>$(RootPath)\tools</ToolsPath>
<Packages>$(SrcPath)\packages</Packages>
</PropertyGroup>
<Target Name="Compile">
<Message Importance="high" Text="Compiling projects"/>
<MSBuild Projects="$(SrcPath)\MyProject.Core\MyProject.Core.csproj"
Properties="Configuration=$(Configuration);Platform=$(Platform)" />
<MSBuild Projects="$(SrcPath)\MyProject.Web\MyProject.Web.csproj;$(SrcPath)\MyProject.Win\MyProject.Win.csproj"
Properties="Configuration=$(Configuration);Platform=$(Platform)"
BuildInParallel="true" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment