Yesterday I migrated my DSL model from April CTP to June CTP of the DSL Toolkit. The migration was almost painless, but I faced with some problems.

This morning with fresh head I redo the migration and for two generic problem I also did the fix.

1st problem is related to migrated model files (not model definition files):

If you've accented characters in your model which we had for Summary and Comment type fields, then they are not preserved since the migrated model file is not saved as UTF-8 encoded. Don't let the model's first line fool you that xml instruction about encoding was put there by the migration tool "by hand" :-)

Here is the fix:

Modify the Save method at the bottom of the M42M6.dslddt file (starting from line 527):
 
      public void Save(string file)
      {
          SerializationResult result = new SerializationResult();
          XmlWriterSettings settings = new XmlWriterSettings ();
          settings.Encoding = System.Text.Encoding.UTF8;
 
          XmlWriter writer = XmlWriter.Create(file, settings);
          <#=modelRootVariable#>.Write(result, writer);
          writer.Close();
      }

Additions are highlighted with red.
 
2nd problem is related to the migrated model too (but need fix in another file):
 
If you've a double quote sign in the model file (again Comment and Summary fields) it will not encoded as the new DSL like it. It will just escaped which is not good, since the new DSL model reader accepts html encoded version of some characters. The & sign is handled properly and it will be &amp;.
 
Here is the fix:
 
in the M42M6.dslddt file's 392nd line replace the body of the QuoteString method from:
 
   return "\"" + s.Replace("\\", "\\\\").Replace("\"", "\\\"").Replace("&", "&amp;") + "\"";
 
to:
 
   return "\"" + s.Replace("\\", "\\\\").Replace("\"", "&quot;").Replace("&", "&amp;") + "\"";

 
Hope this helps for thos who are migrating their models.
 
[Update: The 1st problem will not fixed by the modification since the error is within the TextTransform.exe which is supplied with the migration tools. One workaround is that after migration, take the migrated model and Encode it as UTF-8 with any tool. Sorry for the misleading "fix" :-)]