Created
February 20, 2014 19:10
-
-
Save abenedykt/9120999 to your computer and use it in GitHub Desktop.
msmuild for build a solution and run xunit tests
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"> | |
<PropertyGroup> | |
<WorkingFolder>$(MSBuildProjectDirectory)</WorkingFolder> | |
<Configuration>Release</Configuration> | |
<SolutionFile>WebApplication1.sln</SolutionFile> | |
</PropertyGroup> | |
<Target Name="BuildAll" DependsOnTargets="Compile;Test" /> | |
<Target Name="Compile"> | |
<Message Text="=== COMPILING $(Configuration) configuration ===" /> | |
<MSBuild Projects="$(SolutionFile)" | |
Properties="Configuration=$(Configuration)" /> | |
</Target> | |
<UsingTask AssemblyFile="packages\xunit.1.9.2\lib\net20\xunit.runner.msbuild.dll" TaskName="Xunit.Runner.MSBuild.xunit"/> | |
<ItemGroup> | |
<TestAssemblies | |
Include="**\bin\$(Configuration)\*test*.dll" /> | |
</ItemGroup> | |
<Target Name="Test"> | |
<Message Text="=== Running unit tests : $(Configuration) configuration ===" /> | |
<xunit | |
Assemblies="@(TestAssemblies)" | |
Xml="..\TestResults-$(PROCESSOR_ARCHITECTURE).xml" | |
Html="..\TestResults-$(PROCESSOR_ARCHITECTURE).html" /> | |
</Target> | |
</Project> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cmd
.\MSBuild "path.to.msbuild\project.build" /t:BuildAll /p:Configuration=Release