Index: branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/HeuristicLab.Persistence-4.0.csproj
===================================================================
--- branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/HeuristicLab.Persistence-4.0.csproj	(revision 15035)
+++ branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/HeuristicLab.Persistence-4.0.csproj	(revision 15501)
@@ -37,7 +37,7 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Google.ProtocolBuffers-2.4.1.473, Version=2.4.1.473, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48, processorArchitecture=MSIL">
+    <Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\bin\Google.ProtocolBuffers-2.4.1.473.dll</HintPath>
+      <HintPath>..\..\bin\Google.Protobuf.dll</HintPath>
     </Reference>
     <Reference Include="System" />
Index: branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Protos/PersistenceMessages.proto
===================================================================
--- branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Protos/PersistenceMessages.proto	(revision 15035)
+++ branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Protos/PersistenceMessages.proto	(revision 15501)
@@ -1,2 +1,4 @@
+syntax = "proto3";
+
 package HeuristicLab.Persistence;
 
@@ -4,179 +6,83 @@
   repeated bytes transformer_guids = 1;
   repeated bytes type_guids = 2;
-  repeated string strings = 3;
-  repeated Box boxes = 4;
-  required uint32 root_box_id = 5;
+
+  uint32 root_box_id = 10;
+  repeated Box boxes = 20;
+
+  repeated string strings = 100;
+  repeated bool bools = 101;
+  repeated int32 ints = 102;
+  repeated int64 longs = 103;
+  repeated uint32 uints = 104;
+  repeated uint64 ulongs = 105;
+  repeated float floats = 106;
+  repeated double doubles = 107;
+  repeated bytes bytes = 108;
+
+  repeated StringArrayBox string_arrays = 200;
+  repeated BoolArrayBox bool_arrays = 201;
+  repeated IntArrayBox int_arrays = 202;
+  repeated LongArrayBox long_arrays = 203;
+  repeated UnsignedIntArrayBox uint_arrays = 204;
+  repeated UnsignedLongArrayBox ulong_arrays = 205;
+  repeated FloatArrayBox float_arrays = 206;
+  repeated DoubleArrayBox double_arrays = 207;
+  repeated ByteArrayBox byte_arrays = 208;
+
+  repeated MatrixBox matrices = 300;
+  repeated BoolMatrixBox bool_matrices = 310;
+  repeated IntMatrixBox int_matrices = 311;
+
+  repeated DictionaryBox dictionaries = 400;
+  repeated StorableClassBox storables = 410;
 }
-
 message Box {
-  optional uint32 transformer_id = 1;
-  optional uint32 type_id = 2; 
-
-  extensions 100 to max;
+  uint32 transformer_id = 1;
+  uint32 type_id = 2;
+  uint32 box_id = 3;
+  bool bool = 10;
+  int32 int = 11;
+  int64 long = 12;
+  uint32 uint = 13;
+  uint64 ulong = 14;
+  float float = 15;
+  double double = 16;
 }
-
-
-// scalar boxes
-message BoolBox {
-  extend Box {
-    required BoolBox bool = 100;
-  }
-  required bool value = 1;
-}
-message IntBox {
-  extend Box {
-    required IntBox int = 101;
-  }
-  required int32 value = 1;
-}
-message LongBox {
-  extend Box {
-    required LongBox long = 102;
-  }
-  required int64 value = 1;
-}
-message UnsignedIntBox {
-  extend Box {
-    required UnsignedIntBox unsigned_int = 103;
-  }
-  required uint32 value = 1;
-}
-message UnsignedLongBox {
-  extend Box {
-    required UnsignedLongBox unsigned_long = 104;
-  }
-  required uint64 value = 1;
-}
-message FloatBox {
-  extend Box {
-    required FloatBox float = 105;
-  }
-  required float value = 1;
-}
-message DoubleBox {
-  extend Box {
-    required DoubleBox double = 106;
-  }
-  required double value = 1;
-}
-message StringBox {
-  extend Box {
-    required StringBox string = 107;
-  }
-  required string value = 1;
-}
-message BytesBox {
-  extend Box {
-    required BytesBox bytes = 108;
-  }
-  required bytes value = 1;
+message TypeBox {
+  uint32 version = 1;
+  repeated uint32 generic_type_ids = 2;
 }
 
 // array boxes
-message BoolArrayBox {
-  extend Box {
-    required BoolArrayBox bool_array = 120;
-  }
-  repeated bool values = 1 [packed = true];
-}
-message ByteArrayBox {
-  extend Box {
-    required ByteArrayBox byte_array = 121;
-  }
-  required bytes values = 1;
-}
-message IntArrayBox {
-  extend Box {
-    required IntArrayBox int_array = 122;
-  }
-  repeated int32 values = 1 [packed = true];
-}
-message LongArrayBox {
-  extend Box {
-    required LongArrayBox long_array = 123;
-  }
-  repeated int64 values = 1 [packed = true];
-}
-message UnsignedIntArrayBox {
-  extend Box {
-    required UnsignedIntArrayBox unsigned_int_array = 124;
-  }
-  repeated uint32 values = 1 [packed = true];
-
-  extensions 100 to max;
-}
-message UnsignedLongArrayBox {
-  extend Box {
-    required UnsignedLongArrayBox unsigned_long_array = 125;
-  }
-  repeated uint64 values = 1 [packed = true];
-}
-message FloatArrayBox {
-  extend Box {
-    required FloatArrayBox float_array = 126;
-  }
-  repeated float values = 1 [packed = true];
-}
-message DoubleArrayBox {
-  extend Box {
-    required DoubleArrayBox double_array = 127;
-  }
-  repeated double values = 1 [packed = true];
-}
-message StringArrayBox {
-  extend Box {
-    required StringArrayBox string_array = 128;
-  }
-  repeated string values = 1;
-}
+message StringArrayBox { repeated string values = 1; }
+message BoolArrayBox { repeated bool values = 1; }
+message IntArrayBox { repeated int32 values = 1; }
+message LongArrayBox { repeated int64 values = 1; }
+message UnsignedIntArrayBox { repeated uint32 values = 1; }
+message UnsignedLongArrayBox { repeated uint64 values = 1; }
+message FloatArrayBox { repeated float values = 1; }
+message DoubleArrayBox { repeated double values = 1; }
+message ByteArrayBox { bytes values = 1; }
 
 // matrix boxes
 message MatrixBox {
-  extend Box {
-    required MatrixBox matrix = 140;
-  }
-  optional uint32 element_type_id = 1;
-  repeated uint32 lengths = 2 [packed = true];
-
-  extensions 100 to max;
+  uint32 element_type_id = 1;
+  repeated uint32 lengths = 2;
 }
 message BoolMatrixBox {
-  extend MatrixBox {
-    required BoolMatrixBox bool_matrix = 100;
-  }
-  repeated bool values = 1 [packed = true];
+  MatrixBox matrixBox = 1;
+  repeated bool values = 2;
 }
 message IntMatrixBox {
-  extend MatrixBox {
-    required IntMatrixBox int_matrix = 101;
-  }
-  repeated int32 values = 1 [packed = true];
+  MatrixBox matrixBox = 1;
+  repeated int32 values = 2;
 }
 
 // composite boxes
 message DictionaryBox {
-  extend Box {
-    required DictionaryBox dictionary = 160;
-  }
-  repeated uint32 key_ids = 1 [packed = true];
-  repeated uint32 value_ids = 2 [packed = true];
-  required uint32 comparer_id = 3;
+  map<uint32, uint32> key_value_pairs = 1;
+  uint32 comparer_id = 2;
 }
-
 message StorableClassBox {
-  extend Box {
-    required StorableClassBox storable_class = 200;
-  }
-  repeated uint32 key_ids = 1 [packed = true];
-  repeated uint32 value_ids = 2 [packed = true];
+  map<uint32, uint32> key_value_pairs = 1;
 }
-
-
-message TypeBox {
-  extend Box {
-    required TypeBox type = 250;
-  }
-  optional uint32 version = 1;
-  repeated uint32 generic_type_ids = 2 [packed = true];
-}
-
Index: branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Protos/ProcessProtos.cmd
===================================================================
--- branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Protos/ProcessProtos.cmd	(revision 15035)
+++ branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Protos/ProcessProtos.cmd	(revision 15501)
@@ -1,4 +1,4 @@
 for %%i in ("%ProjectDir%Protos\*.proto") do (
   echo Processing %%i
-  ProtoGen --proto_path="%ProjectDir%\Protos" "%%i" --include_imports -output_directory="%ProjectDir%Protos"
+  protoc-3.5.0 --proto_path="%ProjectDir%\Protos" "%%i" --include_imports --csharp_out="%ProjectDir%Protos"
 )
