Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs	(revision 8660)
@@ -51,5 +51,5 @@
     public abstract void Send(IMessage message);
 
-    public abstract IMessage Receive(IBuilder builder);
+    public abstract IMessage Receive(IBuilder builder, ExtensionRegistry extensions);
 
     public virtual void Close() {
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationProcessChannel.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationProcessChannel.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationProcessChannel.cs	(revision 8660)
@@ -111,6 +111,5 @@
       try {
         streamingChannel.Send(message);
-      }
-      catch {
+      } catch {
         Close();
         throw;
@@ -118,9 +117,8 @@
     }
 
-    public override IMessage Receive(IBuilder builder) {
+    public override IMessage Receive(IBuilder builder, ExtensionRegistry extensions) {
       try {
-        return streamingChannel.Receive(builder);
-      }
-      catch {
+        return streamingChannel.Receive(builder, extensions);
+      } catch {
         Close();
         throw;
@@ -138,6 +136,5 @@
               process.WaitForExit(1000);
               process.Close();
-            }
-            catch { }
+            } catch { }
           }
           // for some reasons the event process_Exited does not fire
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs	(revision 8660)
@@ -21,4 +21,6 @@
 
 using System;
+using System.IO;
+using Google.ProtocolBuffers;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -73,5 +75,5 @@
 
     #region IEvaluationServiceClient Members
-    public QualityMessage Evaluate(SolutionMessage solution) {
+    public QualityMessage Evaluate(SolutionMessage solution, ExtensionRegistry qualityExtensions) {
       int tries = 0, maxTries = RetryParameter.Value.Value;
       bool success = false;
@@ -82,5 +84,5 @@
           CheckAndOpenChannel();
           Channel.Send(solution);
-          result = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder());
+          result = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder(), qualityExtensions);
           success = true;
         } catch (InvalidOperationException) {
@@ -91,8 +93,9 @@
         }
       }
+      if (result != null && result.SolutionId != solution.SolutionId) throw new InvalidDataException(Name + ": Received a quality for a different solution.");
       return result;
     }
 
-    public void EvaluateAsync(SolutionMessage solution, Action<QualityMessage> callback) {
+    public void EvaluateAsync(SolutionMessage solution, ExtensionRegistry qualityExtensions, Action<QualityMessage> callback) {
       int tries = 0, maxTries = RetryParameter.Value.Value;
       bool success = false;
@@ -110,5 +113,5 @@
         }
       }
-      System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(ReceiveAsync), callback);
+      System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(ReceiveAsync), new ReceiveAsyncInfo(solution, callback, qualityExtensions));
     }
     #endregion
@@ -126,10 +129,12 @@
     }
 
-    private void ReceiveAsync(object callback) {
+    private void ReceiveAsync(object callbackInfo) {
+      var info = (ReceiveAsyncInfo)callbackInfo;
       QualityMessage message = null;
       try {
-        message = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder());
+        message = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder(), info.QualityExtensions);
       } catch { }
-      ((Action<QualityMessage>)callback).Invoke(message);
+      if (message != null && message.SolutionId != info.SolutionMessage.SolutionId) throw new InvalidDataException(Name + ": Received a quality for a different solution.");
+      info.CallbackDelegate.Invoke(message);
     }
 
@@ -146,4 +151,15 @@
     }
     #endregion
+
+    private class ReceiveAsyncInfo {
+      public SolutionMessage SolutionMessage { get; set; }
+      public Action<QualityMessage> CallbackDelegate { get; set; }
+      public ExtensionRegistry QualityExtensions { get; set; }
+      public ReceiveAsyncInfo(SolutionMessage solutionMessage, Action<QualityMessage> callbackDelegate, ExtensionRegistry qualityExtensions) {
+        SolutionMessage = solutionMessage;
+        CallbackDelegate = callbackDelegate;
+        QualityExtensions = qualityExtensions;
+      }
+    }
   }
 }
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationStreamChannel.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationStreamChannel.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationStreamChannel.cs	(revision 8660)
@@ -60,8 +60,8 @@
     }
 
-    public override IMessage Receive(IBuilder builder) {
+    public override IMessage Receive(IBuilder builder, ExtensionRegistry extensions) {
       QualityMessage message;
       lock (input) { // only one thread can read from the stream at one time
-        message = QualityMessage.ParseDelimitedFrom(input);
+        message = QualityMessage.ParseDelimitedFrom(input, extensions);
       }
       return message;
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationTCPChannel.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationTCPChannel.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationTCPChannel.cs	(revision 8660)
@@ -88,5 +88,5 @@
     #endregion
 
-    
+
 
     #region IExternalEvaluationChannel Members
@@ -105,10 +105,8 @@
         byte[] buffer = EncodeDelimited(message);
         socket.Send(buffer);
-      }
-      catch (SocketException) {
-        Close();
-        throw;
-      }
-      catch (ObjectDisposedException) {
+      } catch (SocketException) {
+        Close();
+        throw;
+      } catch (ObjectDisposedException) {
         socket = null;
         Close();
@@ -138,14 +136,12 @@
     }
 
-    public override IMessage Receive(IBuilder builder) {
+    public override IMessage Receive(IBuilder builder, ExtensionRegistry extensions) {
       try {
         byte[] buffer = GetMessageBuffer();
-        return builder.WeakMergeFrom(ByteString.CopyFrom(buffer)).WeakBuild();
-      }
-      catch (SocketException) {
-        Close();
-        throw;
-      }
-      catch (ObjectDisposedException) {
+        return builder.WeakMergeFrom(ByteString.CopyFrom(buffer), extensions).WeakBuild();
+      } catch (SocketException) {
+        Close();
+        throw;
+      } catch (ObjectDisposedException) {
         socket = null;
         Close();
@@ -186,6 +182,5 @@
             socket.Disconnect(false);
           socket.Close();
-        }
-        catch { }
+        } catch { }
         socket = null;
       }
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluator.cs	(revision 8660)
@@ -24,4 +24,5 @@
 using System.Linq;
 using System.Threading;
+using Google.ProtocolBuffers;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -35,4 +36,6 @@
   [StorableClass]
   public class ExternalEvaluator : ValuesCollector, IExternalEvaluationProblemEvaluator {
+    protected HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>();
+    protected object clientLock = new object();
 
     #region Parameters
@@ -48,5 +51,5 @@
     #endregion
 
-    #region Parameter Values
+    #region Parameter Properties
     protected SolutionMessageBuilder MessageBuilder {
       get { return MessageBuilderParameter.Value; }
@@ -55,9 +58,4 @@
       get { return ClientsParameter.ActualValue; }
     }
-    #endregion
-
-    #region Fields
-    protected HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>();
-    protected object clientLock = new object();
     #endregion
 
@@ -103,5 +101,5 @@
     }
 
-    protected QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message) {
+    protected virtual QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message) {
       IEvaluationServiceClient client = null;
       lock (clientLock) {
@@ -115,5 +113,5 @@
       }
       try {
-        return client.Evaluate(message);
+        return client.Evaluate(message, GetQualityMessageExtensions());
       } finally {
         lock (clientLock) {
@@ -124,5 +122,9 @@
     }
 
-    protected SolutionMessage BuildSolutionMessage() {
+    protected virtual ExtensionRegistry GetQualityMessageExtensions() {
+      return ExtensionRegistry.CreateInstance();
+    }
+
+    protected virtual SolutionMessage BuildSolutionMessage() {
       lock (clientLock) {
         SolutionMessage.Builder protobufBuilder = SolutionMessage.CreateBuilder();
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/HeuristicLab.Problems.ExternalEvaluation-3.3.csproj
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/HeuristicLab.Problems.ExternalEvaluation-3.3.csproj	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/HeuristicLab.Problems.ExternalEvaluation-3.3.csproj	(revision 8660)
@@ -95,6 +95,6 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Google.ProtocolBuffers-0.9.1, Version=0.9.0.0, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48, processorArchitecture=MSIL">
-      <HintPath>..\..\bin\Google.ProtocolBuffers-0.9.1.dll</HintPath>
+    <Reference Include="Google.ProtocolBuffers-2.4.1.473, Version=2.4.1.473, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48, processorArchitecture=MSIL">
+      <HintPath>..\..\bin\Google.ProtocolBuffers-2.4.1.473.dll</HintPath>
       <Private>False</Private>
     </Reference>
@@ -250,11 +250,17 @@
   -->
   <PropertyGroup>
-    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+   <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
 set ProjectDir=$(ProjectDir)
 set SolutionDir=$(SolutionDir)
+
 call "$(ProjectDir)\Protos\ProcessProtos.cmd"
-
 call PreBuildEvent.cmd
 </PreBuildEvent>
+<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
   </PropertyGroup>
 </Project>
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationChannel.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationChannel.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationChannel.cs	(revision 8660)
@@ -48,5 +48,5 @@
     /// <param name="builder">The builder that must match the message type that is to be received.</param>
     /// <returns>The received message.</returns>
-    IMessage Receive(IBuilder builder);
+    IMessage Receive(IBuilder builder, ExtensionRegistry extensions);
     /// <summary>
     /// Tells the channel to close down and terminate open connections.
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationServiceClient.cs
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationServiceClient.cs	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationServiceClient.cs	(revision 8660)
@@ -21,4 +21,5 @@
 
 using System;
+using Google.ProtocolBuffers;
 using HeuristicLab.Core;
 
@@ -29,12 +30,14 @@
     /// </summary>
     /// <param name="solution">The solution message that should be evaluated.</param>
+    /// <param name="qualityExtensions">An extension registry for the quality message that specifies additional custom fields.</param>
     /// <returns>The resulting quality message from the external process.</returns>
-    QualityMessage Evaluate(SolutionMessage solution);
+    QualityMessage Evaluate(SolutionMessage solution, ExtensionRegistry qualityExtensions);
     /// <summary>
     /// Evaluates a given solution in a non-blocking manner.
     /// </summary>
     /// <param name="solution">The solution message that should be evaluated.</param>
+    /// <param name="qualityExtensions">An extension registry for the quality message that specifies additional custom fields.</param>
     /// <param name="callback">The callback method that is invoked when evaluation is finished.</param>
-    void EvaluateAsync(SolutionMessage solution, Action<QualityMessage> callback);
+    void EvaluateAsync(SolutionMessage solution, ExtensionRegistry qualityExtensions, Action<QualityMessage> callback);
   }
 }
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Plugin.cs.frame
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Plugin.cs.frame	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Plugin.cs.frame	(revision 8660)
@@ -23,5 +23,5 @@
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
-  [Plugin("HeuristicLab.Problems.ExternalEvaluation", "3.3.6.$WCREV$")]
+  [Plugin("HeuristicLab.Problems.ExternalEvaluation", "3.3.7.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.ExternalEvaluation-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Analysis", "3.3")]
@@ -36,5 +36,5 @@
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
-  [PluginDependency("HeuristicLab.ProtobufCS", "0.9.1")]
+  [PluginDependency("HeuristicLab.ProtobufCS", "2.4.1.473")]
   public class HeuristicLabProblemsExternalEvaluationPlugin : PluginBase {
   }
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Properties/AssemblyInfo.cs.frame	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Properties/AssemblyInfo.cs.frame	(revision 8660)
@@ -34,3 +34,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.6.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ExternalEvaluationMessages.proto
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ExternalEvaluationMessages.proto	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ExternalEvaluationMessages.proto	(revision 8660)
@@ -67,4 +67,6 @@
   required int32 solutionId = 1;
   required double quality = 2;
+
+  extensions 1000 to max;
 }
   
Index: branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ProcessProtos.cmd
===================================================================
--- branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ProcessProtos.cmd	(revision 8085)
+++ branches/GP-MoveOperators/HeuristicLab.Problems.ExternalEvaluation/3.3/Protos/ProcessProtos.cmd	(revision 8660)
@@ -1,6 +1,4 @@
-cd "%ProjectDir%"Protos
-
-for %%i in (*.proto) do (
-  "%SolutionDir%"protoc -otmp %%i
-  "%SolutionDir%"ProtoGen tmp
-  del tmp)
+for %%i in ("%ProjectDir%Protos\*.proto") do (
+  echo Processing %%i
+  ProtoGen --proto_path="%ProjectDir%\Protos" "%%i" --include_imports -output_directory="%ProjectDir%Protos"
+)
