File tree 1 file changed +9
-3
lines changed
src/BenchmarkDotNet/Toolchains/DotNetCli
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,12 @@ public BuildResult RestoreThenBuild()
57
57
if ( ! restoreResult . IsSuccess )
58
58
return BuildResult . Failure ( GenerateResult , restoreResult . AllInformation ) ;
59
59
60
- var buildResult = BuildNoRestore ( ) . ToBuildResult ( GenerateResult ) ;
60
+ var buildResult = BuildNoRestore ( ) ;
61
+
62
+ if ( ! buildResult . IsSuccess ) // if we fail to do the full build, we try with --no-dependencies
63
+ buildResult = BuildNoRestoreNoDependencies ( ) ;
61
64
62
- return buildResult ;
65
+ return buildResult . ToBuildResult ( GenerateResult ) ;
63
66
}
64
67
65
68
[ PublicAPI ]
@@ -106,7 +109,10 @@ public DotNetCliCommandResult Restore()
106
109
public DotNetCliCommandResult BuildNoRestore ( )
107
110
=> DotNetCliCommandExecutor . Execute ( WithArguments (
108
111
GetBuildCommand ( BuildPartition , $ "{ Arguments } --no-restore") ) ) ;
109
-
112
+
113
+ public DotNetCliCommandResult BuildNoRestoreNoDependencies ( )
114
+ => DotNetCliCommandExecutor . Execute ( WithArguments (
115
+ GetBuildCommand ( BuildPartition , $ "{ Arguments } --no-restore --no-dependencies") ) ) ;
110
116
111
117
public DotNetCliCommandResult PublishNoBuildAndNoRestore ( )
112
118
=> DotNetCliCommandExecutor . Execute ( WithArguments (
You can’t perform that action at this time.
0 commit comments