Since the Team Build workflow of VS 2012 runs on Windows Workflow 4.5, our internal Team Build Customizations for our software factory called Endeavour use Windows workflow 4.5 as well. During the development of these customizations we ran against this validation exception from within the Xaml targets:

Error 170 Extension ‘Microsoft.Activities.Build.Validation.ValidationBuildExtension’ threw an exception of type ‘System.Xaml.XamlObjectWriterException’ : ‘The invocation of the constructor on type ‘<classname>’ that matches the specified binding constraints threw an exception.’. C:\Windows\Microsoft.NET\Framework\v4.0.3031\Microsoft.Xaml.targets

This usually happens if we manually edit the workflow and re-use namespaces mappings or use a strong name for a given assembly twice in the namespace declaration. while we haven’t been able to locate it specifically, the interesting part is that the visual studio designer can however still read this file. So for us this workaround usually works against this error:

  1. Open the workflow in the designer
  2. Change a title or description
  3. Save the workflow (you will get a message that the encoding of the file has been changed).
  4. Revert the title or description back
  5. Save the workflow
  6. Open the file to see if your change is still there (maybe with a different namespace imports and mapping names now).
  7. Compile

Its a strange defect which we saw in both the Beta, RC, and the RTM of VS 2012. We filed a connect issue, but since it’s very hard to repro there hasn’t been a fix yet.

This entry was posted in Microsoft Development, Various and tagged , by Rolf Huisman. Bookmark the permalink.
Rolf Huisman

About Rolf Huisman

Rolf works as an application lifecycle management (ALM) consultant at Info Support. His main focus is on ALM using the Visual Studio ALM tools (e.g. Visual Studio, TFS, MTM) and the Info Support software factory named Endeavour. His personal interests include analog electronics, security and discrete mathematics.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>