Browse Source

Load errors from referenced assemblies no longer prevent the forms designer from loading. Those errors are shown in the compiler message view instead.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2958 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Christian Hornung 18 years ago
parent
commit
6a3db9d401
  1. 13
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs

13
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs

@ -15,6 +15,7 @@ using System.Reflection; @@ -15,6 +15,7 @@ using System.Reflection;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project;
using Microsoft.Win32;
@ -213,7 +214,17 @@ namespace ICSharpCode.FormsDesigner.Services @@ -213,7 +214,17 @@ namespace ICSharpCode.FormsDesigner.Services
File.Delete(tempPath);
} catch {}
} else {
throw; // don't ignore other load errors
// Show other load errors in the compiler message view,
// but do not prevent the designer from loading.
// The error might be caused by an assembly that is
// not even needed for the designer to load.
LoggingService.Error("Error loading assembly " + fileName, e);
WorkbenchSingleton.Workbench.GetPad(typeof(CompilerMessageView)).BringPadToFront();
TaskService.BuildMessageViewCategory.AppendText(
StringParser.Parse("${res:FileUtilityService.ErrorWhileLoading}")
+ "\r\n" + fileName + "\r\n" + e.Message + "\r\n"
);
return null;
}
} catch (FileLoadException e) {
if (e.Message.Contains("HRESULT: 0x80131402")) {

Loading…
Cancel
Save