Index: /trunk/sources/HeuristicLab.Grid/EngineRunner.cs
===================================================================
--- /trunk/sources/HeuristicLab.Grid/EngineRunner.cs	(revision 765)
+++ /trunk/sources/HeuristicLab.Grid/EngineRunner.cs	(revision 766)
@@ -25,4 +25,6 @@
 using HeuristicLab.Core;
 using System.Threading;
+using HeuristicLab.PluginInfrastructure;
+using System.Reflection;
 
 namespace HeuristicLab.Grid {
Index: /trunk/sources/HeuristicLab.Grid/GridClient.cs
===================================================================
--- /trunk/sources/HeuristicLab.Grid/GridClient.cs	(revision 765)
+++ /trunk/sources/HeuristicLab.Grid/GridClient.cs	(revision 766)
@@ -26,4 +26,5 @@
 using System.Diagnostics;
 using System.Threading;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Grid {
@@ -134,6 +135,8 @@
         if(gotEngine && !stopped) {
           executing = true;
-          AppDomain engineDomain = AppDomain.CreateDomain("Engine domain", null, AppDomain.CurrentDomain.SetupInformation);
-          EngineRunner runner = (EngineRunner)engineDomain.CreateInstanceAndUnwrap("HeuristicLab.Grid", typeof(EngineRunner).FullName);
+          AppDomain engineDomain = PluginManager.Manager.CreateAndInitAppDomain("Engine domain");
+          Type engineRunnerType = typeof(EngineRunner);
+          
+          EngineRunner runner = (EngineRunner)engineDomain.CreateInstanceAndUnwrap(engineRunnerType.Assembly.GetName().Name, engineRunnerType.FullName);
           byte[] resultXml = runner.Execute(engineXml);
           bool success = false;
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs	(revision 765)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs	(revision 766)
@@ -84,5 +84,5 @@
       pluginDomain = AppDomain.CreateDomain("plugin domain", null, setup);
       remoteLoader = (Loader)pluginDomain.CreateInstanceAndUnwrap("HeuristicLab.PluginInfraStructure", "HeuristicLab.PluginInfrastructure.Loader");
-      remoteLoader.PluginAction += delegate(object sender, PluginManagerActionEventArgs args) { if(Action != null) Action(this, args); };
+      remoteLoader.PluginAction += delegate(object sender, PluginManagerActionEventArgs args) { if (Action != null) Action(this, args); };
       remoteLoader.Init();
       NotifyListeners(PluginManagerAction.Initialized, "-");
@@ -100,18 +100,36 @@
 
       NotifyListeners(PluginManagerAction.Starting, appInfo.Name);
+      AppDomain applicationDomain = null;
+      try {
+        applicationDomain = CreateAndInitAppDomain(appInfo.Name + " AppDomain");
+        Runner remoteRunner = (Runner)applicationDomain.CreateInstanceAndUnwrap(typeof(Runner).Assembly.GetName().Name, typeof(Runner).FullName);
+        remoteRunner.Run(appInfo);
+      }
+      finally {
+        // make sure domain is unloaded in all cases
+        if (applicationDomain != null) AppDomain.Unload(applicationDomain);
+      }
+    }
+
+    /// <summary>
+    /// Creates a new AppDomain with all plugins preloaded.
+    /// </summary>
+    /// <param name="friendlyName">Name of the new AppDomain</param>
+    /// <returns>the new AppDomain with all plugins preloaded.</returns>
+    public AppDomain CreateAndInitAppDomain(string friendlyName) {
       AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
       setup.PrivateBinPath = pluginDir;
-      AppDomain applicationDomain = AppDomain.CreateDomain(appInfo.Name + " AppDomain", null, setup);
-      try {
-        Runner remoteRunner = (Runner)applicationDomain.CreateInstanceAndUnwrap("HeuristicLab.PluginInfrastructure", "HeuristicLab.PluginInfrastructure.Runner");
-        NotifyListeners(PluginManagerAction.Initializing, "All plugins");
+      AppDomain applicationDomain = AppDomain.CreateDomain(friendlyName, null, setup);
+      Runner remoteRunner = (Runner)applicationDomain.CreateInstanceAndUnwrap(typeof(Runner).Assembly.GetName().Name, typeof(Runner).FullName);
+      NotifyListeners(PluginManagerAction.Initializing, "All plugins");
+      if (remoteLoader != null) {
         remoteRunner.LoadPlugins(remoteLoader.ActivePlugins);
-        NotifyListeners(PluginManagerAction.Initialized, "All plugins");
-        remoteRunner.Run(appInfo);
-      } finally {
-        // make sure domain is unloaded in all cases
-        AppDomain.Unload(applicationDomain);
+      } else if (LoadedPlugins != null && LoadedPlugins.Count > 0) {
+        remoteRunner.LoadPlugins(LoadedPlugins);
       }
+      NotifyListeners(PluginManagerAction.Initialized, "All plugins");
+      return applicationDomain;
     }
+
 
     /// <summary>
@@ -122,7 +140,7 @@
     public List<PluginInfo> GetDependentPlugins(PluginInfo pluginInfo) {
       List<PluginInfo> mergedList = new List<PluginInfo>();
-      foreach(PluginInfo plugin in InstalledPlugins) {
-        if(plugin.Dependencies.Contains(pluginInfo)) {
-          if(!mergedList.Contains(plugin)) {
+      foreach (PluginInfo plugin in InstalledPlugins) {
+        if (plugin.Dependencies.Contains(pluginInfo)) {
+          if (!mergedList.Contains(plugin)) {
             mergedList.Add(plugin);
           }
@@ -130,5 +148,5 @@
           // make sure that only one entry for each plugin is added to the merged list
           GetDependentPlugins(plugin).ForEach(delegate(PluginInfo dependentPlugin) {
-            if(!mergedList.Contains(dependentPlugin)) {
+            if (!mergedList.Contains(dependentPlugin)) {
               mergedList.Add(dependentPlugin);
             }
@@ -164,5 +182,5 @@
 
     private void NotifyListeners(PluginManagerAction action, string text) {
-      if(Action != null) {
+      if (Action != null) {
         Action(this, new PluginManagerActionEventArgs(text, action));
       }
