public ProjectBrowser(IServiceProvider serviceProvider) { InitializeComponent(); _defaultFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); _windowManager = (WindowManager)serviceProvider.GetService(typeof(WindowManager)); _statusManager = (IStatusManager)_windowManager.GetService(typeof(IStatusManager)); _lookup = new LookupHelper(_windowManager); // The below shadow copy technique does *not* stop the assemblies being locked. //AppDomain.CurrentDomain.SetShadowCopyFiles(); //AppDomain.CurrentDomain.SetShadowCopyPath("c:\\temp"); // SetupInformation is used only at start of domain. // Loading them into another domain still locks them. // Only thing that seems to prevent locking is bytecopy load. // Bytecopy load has problems finding referenced assemblies. // This can be got around with CurrentDomain_AssemblyResolve? }