Browse Source

Revert "Fix Assembly resolving in WPF Designer if Control DLLs require other Control DLLs"

This reverts commit 2b8f0cba26.
pull/584/head
jkuehner 11 years ago
parent
commit
b7d36b3ad6
  1. 18
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs

18
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/WpfViewContent.cs

@ -22,7 +22,6 @@ using System.ComponentModel; @@ -22,7 +22,6 @@ using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
@ -61,19 +60,6 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -61,19 +60,6 @@ namespace ICSharpCode.WpfDesign.AddIn
this.TabPageText = "${res:FormsDesigner.DesignTabPages.DesignTabPage}";
this.IsActiveViewContentChanged += OnIsActiveViewContentChanged;
var compilation = SD.ParserService.GetCompilationForFile(file.FileName);
_path = Path.GetDirectoryName(compilation.MainAssembly.UnresolvedAssembly.Location);
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
var assemblyName = (new AssemblyName(args.Name));
string fileName = Path.Combine(_path, assemblyName.Name) + ".dll";
if (File.Exists(fileName))
return Assembly.LoadFile(fileName);
return null;
}
static WpfViewContent()
@ -82,8 +68,7 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -82,8 +68,7 @@ namespace ICSharpCode.WpfDesign.AddIn
ICSharpCode.Core.MessageService.ShowException(e.Exception);
};
}
private string _path;
DesignSurface designer;
List<SDTask> tasks = new List<SDTask>();
@ -300,7 +285,6 @@ namespace ICSharpCode.WpfDesign.AddIn @@ -300,7 +285,6 @@ namespace ICSharpCode.WpfDesign.AddIn
public override void Dispose()
{
AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;
SD.ProjectService.ProjectItemAdded -= OnReferenceAdded;
propertyContainer.Clear();

Loading…
Cancel
Save