File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/BenchmarkDotNet/Toolchains/DotNetCli Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,12 @@ public BuildResult RestoreThenBuild()
5757 if ( ! restoreResult . IsSuccess )
5858 return BuildResult . Failure ( GenerateResult , restoreResult . AllInformation ) ;
5959
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 ( ) ;
6164
62- return buildResult ;
65+ return buildResult . ToBuildResult ( GenerateResult ) ;
6366 }
6467
6568 [ PublicAPI ]
@@ -106,7 +109,10 @@ public DotNetCliCommandResult Restore()
106109 public DotNetCliCommandResult BuildNoRestore ( )
107110 => DotNetCliCommandExecutor . Execute ( WithArguments (
108111 GetBuildCommand ( BuildPartition , $ "{ Arguments } --no-restore") ) ) ;
109-
112+
113+ public DotNetCliCommandResult BuildNoRestoreNoDependencies ( )
114+ => DotNetCliCommandExecutor . Execute ( WithArguments (
115+ GetBuildCommand ( BuildPartition , $ "{ Arguments } --no-restore --no-dependencies") ) ) ;
110116
111117 public DotNetCliCommandResult PublishNoBuildAndNoRestore ( )
112118 => DotNetCliCommandExecutor . Execute ( WithArguments (
You can’t perform that action at this time.
0 commit comments