@@ -14,16 +14,24 @@ Task("Clean")
1414 CleanDirectory ( artifacts ) ;
1515} ) ;
1616
17- Task ( "Restore" )
17+ Task ( "Restore (Unix)" )
18+ . WithCriteria ( IsRunningOnUnix )
19+ . Does ( ( ) =>
20+ {
21+ MSBuild ( "./LSP.sln" , settings => settings . SetConfiguration ( configuration ) . WithTarget ( "Restore" ) ) ;
22+ } ) ;
23+
24+ Task ( "Restore (Windows)" )
25+ . WithCriteria ( IsRunningOnWindows )
1826 . Does ( ( ) =>
1927{
20- MSBuild ( "./LSP.sln" , settings =>
21- settings
22- . SetConfiguration ( configuration )
23- . WithTarget ( "Restore" ) ) ;
24- // DotNetCoreRestore();
28+ DotNetCoreRestore ( ) ;
2529} ) ;
2630
31+ Task ( "Restore" )
32+ . IsDependentOn ( "Restore (Unix)" )
33+ . IsDependentOn ( "Restore (Windows)" ) ;
34+
2735Task ( "Build" )
2836 . IsDependentOn ( "Restore" )
2937 . DoesForEach ( GetFiles ( "src/**/*.csproj" ) . Concat ( GetFiles ( "test/**/*.csproj" ) ) , ( project ) =>
@@ -48,14 +56,10 @@ Task("Test (No Coverage)")
4856 . IsDependentOn ( "Build" )
4957 . DoesForEach ( GetFiles ( "test/*/*.csproj" ) , ( testProject ) =>
5058{
51- DotNetCoreTool (
59+ DotNetCoreTest (
5260 testProject . GetDirectory ( ) . FullPath ,
53- "xunit" ,
54- new ProcessArgumentBuilder ( )
55- . AppendSwitchQuoted ( "-xml" , string . Format ( "{0}/tests/{1}.xml" , artifacts , testProject . GetFilenameWithoutExtension ( ) ) )
56- . AppendSwitch ( "-configuration" , configuration )
57- . Append ( "-noshadow" ) ,
58- new DotNetCoreToolSettings ( ) {
61+ new DotNetCoreTestSettings ( ) {
62+ NoBuild = true ,
5963 EnvironmentVariables = GitVersionEnvironmentVariables ,
6064 } ) ;
6165} ) ;
0 commit comments