BUG: Migrating VSTO Word 2008 document to later versions of VSTO

I attempted to upgrade a Word 2007 document-level customization, created with VSTO 2008 to VSTO 2012 and Word 2013 the other day. Even after following all the migration steps, I was still getting an error message for the Document Designer:

“Designer failed to load correctly. Do not use the Designer to work on the document until you fix any errors in the error list, then close and re-open the Designer. Some errors can be fixed by rebuilding your project, while other might require code changes.”

The error list was full of warnings and errors, all pertaining to schema information in ThisDocument.Designer.XML:
Could not find schema information for the element ‘http://schemas.microsoft.com/2004/VisualStudio/Tools/Applications/HostItem.xsd:hostItem’.

It turns out there’s a bug in the automatic upgrade for document-level customizations containing content controls. No problems for any other project, just if content controls are on the document surface.

This had never been encountered before, so there’s no documentation on the bug and no fix, at the time of this writing.

Workaround: The document customization should work (debug) correctly, it’s just not possible to use the Designer to make any changes. If working in the Designer is necessary, then at the moment the only possibility is to create a new project, then copy in the code from the existing project.

Leave a Reply