Browse Source

Fixed assembly loading bug introduced in rev. 429.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@431 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
986d49240a
  1. 19
      src/Main/Base/Project/Src/Services/ParserService/ProjectContentRegistry.cs
  2. 1
      src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

19
src/Main/Base/Project/Src/Services/ParserService/ProjectContentRegistry.cs

@ -221,7 +221,26 @@ namespace ICSharpCode.Core @@ -221,7 +221,26 @@ namespace ICSharpCode.Core
}
}
static Dictionary<string, Assembly> loadFromCache;
static Assembly LoadReflectionOnlyAssemblyFrom(string fileName)
{
if (loadFromCache == null) {
loadFromCache = new Dictionary<string, Assembly>(StringComparer.InvariantCultureIgnoreCase);
}
if (loadFromCache.ContainsKey(fileName))
return loadFromCache[fileName];
Assembly asm = InternalLoadReflectionOnlyAssemblyFrom(fileName);
if (loadFromCache.ContainsKey(asm.FullName)) {
loadFromCache.Add(fileName, loadFromCache[asm.FullName]);
return loadFromCache[asm.FullName];
}
loadFromCache.Add(fileName, asm);
loadFromCache.Add(asm.FullName, asm);
return asm;
}
static Assembly InternalLoadReflectionOnlyAssemblyFrom(string fileName)
{
byte[] data;
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {

1
src/Main/StartUp/Project/Dialogs/ExceptionBox.cs

@ -107,7 +107,6 @@ namespace ICSharpCode.SharpDevelop @@ -107,7 +107,6 @@ namespace ICSharpCode.SharpDevelop
void continueButtonClick(object sender, System.EventArgs e)
{
DialogResult = System.Windows.Forms.DialogResult.Ignore;
CopyInfoToClipboard();
Close();
}

Loading…
Cancel
Save