File tree Expand file tree Collapse file tree
src/BenchmarkDotNet/Toolchains/CsProj Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,11 +161,17 @@ public static int Main(string[] args)
161161
162162 if ( ! buildResult . IsBuildSuccess )
163163 {
164- throw buildResult . TryToExplainFailureReason ( out string reason )
165- ? new Exception ( reason )
166- : new Exception ( buildResult . ErrorMessage ) ;
164+ if ( ! buildResult . TryToExplainFailureReason ( out string reason ) )
165+ {
166+ reason = buildResult . ErrorMessage ;
167+ }
168+ logger . WriteLineWarning ( $ "Failed to gather assembly references, reason:{ Environment . NewLine } { reason } ") ;
169+ return ;
167170 }
168171
172+ // Delete the dll from the gatherer project to prevent duplicate references.
173+ File . Delete ( Path . Combine ( artifactsPaths . BinariesDirectoryPath , $ "{ artifactsPaths . ProgramName } .dll") ) ;
174+
169175 xmlDoc = new XmlDocument ( ) ;
170176 xmlDoc . Load ( artifactsPaths . ProjectFilePath ) ;
171177 projectElement = xmlDoc . DocumentElement ;
You can’t perform that action at this time.
0 commit comments