@@ -16,6 +16,7 @@ using System.Text.RegularExpressions;
1616//////////////////////////////////////////////////////////////////////
1717
1818var target = Argument( "target", " Default") ;
19+ var configuration = Argument( "configuration" , "Release" ) ;
1920
2021//////////////////////////////////////////////////////////////////////
2122// VERSIONS
@@ -35,7 +36,7 @@ var toolsDir = buildDir + "/tools";
3536var binDir = baseDir + "/bin" ;
3637var nupkgDir = binDir + "/nupkg" ;
3738
38- var taefBinDir = baseDir + "/UITests/UITests.Tests.TAEF/bin/Release /netcoreapp3.1/win10-x86" ;
39+ var taefBinDir = baseDir + $ "/UITests/UITests.Tests.TAEF/bin/{ configuration } /netcoreapp3.1/win10-x86";
3940
4041var styler = toolsDir + "/XamlStyler.Console/tools/xstyler.exe" ;
4142var stylerFile = baseDir + "/settings.xamlstyler" ;
@@ -151,7 +152,7 @@ Task("BuildProjects")
151152 {
152153 MaxCpuCount = 0
153154 }
154- . SetConfiguration ( "Release" )
155+ . SetConfiguration ( configuration )
155156 . WithTarget ( "Restore" ) ;
156157
157158 MSBuild ( Solution , buildSettings ) ;
@@ -163,7 +164,7 @@ Task("BuildProjects")
163164 {
164165 MaxCpuCount = 0
165166 }
166- . SetConfiguration ( "Release" )
167+ . SetConfiguration ( configuration )
167168 . WithTarget ( "Build" )
168169 . WithProperty ( "GenerateLibraryLayout" , "true" ) ;
169170
@@ -215,7 +216,7 @@ Task("Package")
215216 {
216217 MaxCpuCount = 0
217218 }
218- . SetConfiguration ( "Release" )
219+ . SetConfiguration ( configuration )
219220 . WithTarget ( "Pack" )
220221 . WithProperty ( "GenerateLibraryLayout" , "true" )
221222 . WithProperty ( "PackageOutputPath" , nupkgDir ) ;
@@ -253,13 +254,13 @@ Task("Test")
253254 ArgumentCustomization = arg => arg . Append ( "/logger:trx;LogFileName=VsTestResultsUwp.trx /framework:FrameworkUap10" ) ,
254255 } ;
255256
256- VSTest ( baseDir + "/**/Release /**/UnitTests.*.appxrecipe" , testSettings ) ;
257+ VSTest ( baseDir + $ "/**/{ configuration } /**/UnitTests.*.appxrecipe", testSettings ) ;
257258} ) . DoesForEach ( GetFiles ( baseDir + "/**/UnitTests.*NetCore.csproj" ) , ( file ) =>
258259{
259260 Information ( "\n Running NetCore Unit Tests" ) ;
260261 var testSettings = new DotNetCoreTestSettings
261262 {
262- Configuration = "Release" ,
263+ Configuration = configuration ,
263264 NoBuild = true ,
264265 Loggers = new [ ] { "trx;LogFilePrefix=VsTestResults" } ,
265266 Verbosity = DotNetCoreVerbosity . Normal ,
@@ -306,7 +307,7 @@ Task("MSTestUITest")
306307
307308 var testSettings = new DotNetCoreTestSettings
308309 {
309- Configuration = "Release" ,
310+ Configuration = configuration ,
310311 NoBuild = true ,
311312 Loggers = new [ ] { "trx;LogFilePrefix=VsTestResults" } ,
312313 Verbosity = DotNetCoreVerbosity . Normal
0 commit comments