11#tool "xunit.runner.console" 
2+ #tool "nuget:?package=GitVersion.CommandLine" 
23
34var  target  =  Argument ( "target" ,  "Default" ) ; 
45var  configuration  =  Argument ( "configuration" ,  "Release" ) ; 
6+ var  debugConfiguration  =  Argument ( "configuration" ,  "Debug" ) ; 
57var  buildDir  =  Directory ( "./build" ) ; 
68var  distDir  =  Directory ( "./dist" ) ; 
79var  solutionFile  =  GetFiles ( "./*.sln" ) . First ( ) ; 
@@ -16,6 +18,11 @@ Task("Clean")
1618			. SetConfiguration ( configuration ) 
1719			. WithTarget ( "Clean" ) 
1820			. SetVerbosity ( Verbosity . Minimal ) ) ; 
21+ 
22+ 		MSBuild ( solutionFile ,  settings =>  settings 
23+ 			. SetConfiguration ( debugConfiguration ) 
24+ 			. WithTarget ( "Clean" ) 
25+ 			. SetVerbosity ( Verbosity . Minimal ) ) ; 
1926	} ) ; 
2027
2128Task ( "Clean-Outputs" ) 
@@ -30,7 +37,7 @@ Task("Build")
3037    . Does ( ( )  => 
3138	{ 
3239		NuGetRestore ( solutionFile ) ; 
33- 
40+ 		 GitVersion ( new   GitVersionSettings   {   UpdateAssemblyInfo   =   true   } ) ; 
3441		MSBuild ( solutionFile ,  settings =>  settings 
3542			. SetConfiguration ( configuration ) 
3643			. WithTarget ( "Rebuild" ) 
@@ -41,13 +48,13 @@ Task("Test")
4148	. IsDependentOn ( "Build" ) 
4249    . Does ( ( )  => 
4350	{ 
44- 		XUnit2 ( string . Format ( "./test/**/bin/{0} /*.Tests.dll" ,  configuration ) ,  new  XUnit2Settings  { 
51+ 		XUnit2 ( string . Format ( "./test/**/bin/Release/** /*.Tests.dll" ,  configuration ) ,  new  XUnit2Settings  { 
4552			XmlReport  =  true , 
4653			OutputDirectory  =  buildDir 
4754		} ) ; 
4855} ) ; 
4956
5057Task ( "Default" ) 
51- 	. IsDependentOn ( "Build " ) ; 
58+ 	. IsDependentOn ( "Test " ) ; 
5259
5360RunTarget ( target ) ; 
0 commit comments