Last active
December 16, 2015 13:59
-
-
Save marcofranssen/5445409 to your computer and use it in GitHub Desktop.
Gists belonging to my CI with Jenkins, MSBuild, Nuget and Git part 2 blogpost http://marcofranssen.nl/ci-with-jenkins-msbuild-nuget-and-git-part-2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- The Clean Target --> | |
<ItemGroup> | |
<ProjectFiles Include="**\*.csproj" /> | |
</ItemGroup> | |
<Target Name="Clean"> | |
<Message Importance="high" Text="Cleaning folders"/> | |
<RemoveDir Directories="$(ReportsPath)" Condition="Exists('$(ReportsPath)')" /> | |
<MakeDir Directories = "$(ReportsPath);$(ReportsPath)\MSpec;$(ReportsPath)\Coverage" /> | |
<!-- Clean the source code projects --> | |
<MSBuild Projects="@(ProjectFiles)" | |
ContinueOnError="false" | |
Targets="Clean" | |
Properties="Configuration=$(Configuration)" /> | |
</Target> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- The LoadNuGetPackages Target --> | |
<ItemGroup> | |
<NuGetPackageConfigs Include="$(MSBuildStartupDirectory)\**\packages.config" /> | |
</ItemGroup> | |
<Target Name="LoadNuGetPackages"> | |
<Message Importance="high" Text="Retrieving packages for %(NuGetPackageConfigs.Identity)" /> | |
<Exec Command=""$(SrcPath)\.nuget\nuget" install "%(NuGetPackageConfigs.Identity)" -o "$(SrcPath)\packages"" /> | |
</Target> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> | |
<!-- The Clean Target --> | |
<ItemGroup> | |
<ProjectFiles Include="**\*.csproj" /> | |
</ItemGroup> | |
<Target Name="Clean"> | |
<Message Importance="high" Text="Cleaning folders"/> | |
<RemoveDir Directories="$(ReportsPath)" Condition="Exists('$(ReportsPath)')" /> | |
<MakeDir Directories = "$(ReportsPath);$(ReportsPath)\MSpec;$(ReportsPath)\Coverage" /> | |
<!-- Clean the source code projects --> | |
<MSBuild Projects="@(ProjectFiles)" | |
ContinueOnError="false" | |
Targets="Clean" | |
Properties="Configuration=$(Configuration)" /> | |
</Target> | |
<!-- The LoadNuGetPackages Target --> | |
<ItemGroup> | |
<NuGetPackageConfigs Include="$(MSBuildStartupDirectory)\**\packages.config" /> | |
</ItemGroup> | |
<Target Name="LoadNuGetPackages"> | |
<Message Importance="high" Text="Retrieving packages for %(NuGetPackageConfigs.Identity)" /> | |
<Exec Command=""$(SrcPath)\.nuget\nuget" install "%(NuGetPackageConfigs.Identity)" -o "$(SrcPath)\packages"" /> | |
</Target> | |
<!-- The Compile Target --> | |
<Target Name="Compile" DependsOnTargets="Clean;LoadNuGetPackages"> | |
<Message Importance="high" Text="Compiling core 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