Browse Source

Handle BadImageFormatException in ProjectContentContainer.DoResolveReferences()

pull/512/head
Daniel Grunwald 11 years ago
parent
commit
4ce0129433
  1. 12
      src/Main/Base/Project/Parser/ProjectContentContainer.cs

12
src/Main/Base/Project/Parser/ProjectContentContainer.cs

@ -463,9 +463,15 @@ namespace ICSharpCode.SharpDevelop.Parser @@ -463,9 +463,15 @@ namespace ICSharpCode.SharpDevelop.Parser
foreach (var file in assemblyFiles) {
progressMonitor.CancellationToken.ThrowIfCancellationRequested();
if (File.Exists(file)) {
var pc = SD.AssemblyParserService.GetAssembly(file, false, progressMonitor.CancellationToken);
if (pc != null) {
newReferences.Add(pc);
try {
var pc = SD.AssemblyParserService.GetAssembly(file, false, progressMonitor.CancellationToken);
if (pc != null) {
newReferences.Add(pc);
}
} catch (IOException ex) {
LoggingService.Warn(ex);
} catch (BadImageFormatException ex) {
LoggingService.Warn(ex);
}
}
progressMonitor.Progress += (1.0 - assemblyResolvingProgress) / assemblyFiles.Count;

Loading…
Cancel
Save