Created
December 2, 2013 13:48
-
-
Save grmartin/7749694 to your computer and use it in GitHub Desktop.
ci.msbuild from https://github.com/grmartin/c-sharp-mvc4api-unit-test-example-project/edit/master/ci.msbuild for documentation.
This file contains 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" ToolsVersion="4.0" VisualStudioVersion="12.0"> | |
<PropertyGroup> | |
<Configuration>Debug</Configuration> | |
<Platform>AnyCPU</Platform> | |
<DefineSolutionProperties>false</DefineSolutionProperties> | |
<!-- General Paths --> | |
<RootPath>$(MSBuildProjectDirectory)</RootPath> | |
<SrcPath>$(RootPath)</SrcPath> | |
<Packages>$(SrcPath)\packages</Packages> | |
<TestAssemblyOutputDir>$(SrcPath)\MvcApplicationTest.Tests\bin\$(Configuration)\MvcApplicationTest.Tests.dll</TestAssemblyOutputDir> | |
<MyProgramFiles>$(ProgramW6432)</MyProgramFiles> | |
<MyProgramFiles Condition="$(MyProgramFiles) == ''">$(ProgramFiles)</MyProgramFiles> | |
<MyProgramFiles Condition="$(MyProgramFiles) == ''">C:\Program Files\</MyProgramFiles> | |
</PropertyGroup> | |
<!-- The Clean Target --> | |
<ItemGroup> | |
<ProjectFiles Include="**\*.csproj" /> | |
</ItemGroup> | |
<Target Name="Clean"> | |
<!-- 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.exe" restore $(SrcPath)\MvcApplicationTest.sln" /> | |
<!-- Exec Command=""$(SrcPath)\.nuget\nuget.exe" 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)\MvcApplicationTest.sln" /> | |
</Target> | |
<Target Name="CodeCoverage" DependsOnTargets="Compile"> | |
<Message Importance="high" Text="Attempting VS 2013 Code Coverage via VSTest.console.exe" /> | |
<Message Importance="normal" Text="Failure of this target in no way should hinder the build." /> | |
<Exec IgnoreExitCode="True" ContinueOnError="True" command=""$(SrcPath)\.jenkinskit\JenkinsKit.exe" codecoverage "$(TestAssemblyOutputDir)" "$(SrcPath)\Coverage.xml"" /> | |
</Target> | |
<!-- The Jenkins Target --> | |
<Target Name="Jenkins" DependsOnTargets="LoadNuGetPackages;Clean;Compile;CodeCoverage"> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment