@@ -14,16 +14,24 @@ Task("Clean")
14
14
CleanDirectory ( artifacts ) ;
15
15
} ) ;
16
16
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 )
18
26
. Does ( ( ) =>
19
27
{
20
- MSBuild ( "./LSP.sln" , settings =>
21
- settings
22
- . SetConfiguration ( configuration )
23
- . WithTarget ( "Restore" ) ) ;
24
- // DotNetCoreRestore();
28
+ DotNetCoreRestore ( ) ;
25
29
} ) ;
26
30
31
+ Task ( "Restore" )
32
+ . IsDependentOn ( "Restore (Unix)" )
33
+ . IsDependentOn ( "Restore (Windows)" ) ;
34
+
27
35
Task ( "Build" )
28
36
. IsDependentOn ( "Restore" )
29
37
. DoesForEach ( GetFiles ( "src/**/*.csproj" ) . Concat ( GetFiles ( "test/**/*.csproj" ) ) , ( project ) =>
@@ -48,14 +56,10 @@ Task("Test (No Coverage)")
48
56
. IsDependentOn ( "Build" )
49
57
. DoesForEach ( GetFiles ( "test/*/*.csproj" ) , ( testProject ) =>
50
58
{
51
- DotNetCoreTool (
59
+ DotNetCoreTest (
52
60
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 ,
59
63
EnvironmentVariables = GitVersionEnvironmentVariables ,
60
64
} ) ;
61
65
} ) ;
0 commit comments