title: how to delete the pluginassembly after AppDomain.Unload(domain)
body: <p>i have a weird problem.
  i would like to delete an assembly(plugin.dll on harddisk) which is already loaded, but the assembly is locked by the operating system (vista), even if i have unloaded it. </p>
  
  <p>f.e.</p>
  
  <pre><code>AppDomainSetup setup = new AppDomainSetup();
  setup.ShadowCopyFiles = "true";
  AppDomain appDomain = AppDomain.CreateDomain(assemblyName + "_AppDomain", AppDomain.CurrentDomain.Evidence, setup);
  IPlugin plugin = (IPlugin)appDomain.CreateInstanceFromAndUnwrap(assemblyName,                        "Plugin.MyPlugins");
  </code></pre>
  
  <p>I also need the assemblyinfos, because I don't know which classes in the pluginassembly implements the IPlugin Interface. It should be possible to have more than one Plugin in one Pluginassembly.</p>
  
  <pre><code>Assembly assembly = appDomain.Load(assemblyName);
  if (assembly != null) {
     Type[] assemblyTypes = assembly.GetTypes();
     foreach (Type assemblyTyp in assemblyTypes) {
        if (typeof(IPlugin).IsAssignableFrom(assemblyTyp)) {
           IPlugin plugin = (IPlugin)Activator.CreateInstance(assemblyTyp);
           plugin.AssemblyName = assemblyNameWithEx;
           plugin.Host = this;
        }
     }
  }
  AppDomain.Unload(appDomain);
  </code></pre>
  
  <p>How is it possible to get the assemblyinfos from the appDomain without locking the assembly? </p>
  
  <p>best regards</p>