Invalid manifest loads but the fixed manifest does not (?!)

N

news.microsoft.com

I have run into a weird problem; I'm making a C# Outlook addin, register a
form region on HKCU, so far so good.

I did then a refactor in code, and I have changed the form name (the string
used for GetFormRegionManifest etc. of FormRegionStartup).
Everything is ok, *but* notice in the following manifest (I am pasting the
full manifest content at the end of the message)
after the section
<!-- <exactMessageClass>false</exactMessageClass> -->s
there is an extra 's' character, which obviously is not correct.

The manifest is embedded in addin as a resource
(Properties.Resources.DetailsUrlRegion_manifest in the code below)
and returned to Outlook using:
....
public object GetFormRegionManifest(string FormRegionName,
int LCID) {
Debug.WriteLine(">> GetFormRegionManifest: FormRegionName=" +
FormRegionName);
if (FormRegionName == "DLC.DetailsUrl") {
Debug.WriteLine("MANIFEST:\r\n============\r\n" +
Properties.Resources.DetailsUrlRegion_manifest + "\r\n============\r\n");
return Properties.Resources.DetailsUrlRegion_manifest;
}
return null;
}
....

If I add more characters after the rogue 's', it's still ok.
If I delete the 's', GetFormRegionManifest is still called (obviously), but
the form region does not load (i.e. GetFormRegionStorage is not called).

Even more, if I revert the order of lines
<!-- <exactMessageClass>false</exactMessageClass> -->s
<formRegionType>adjoining</formRegionType>
into
<formRegionType>adjoining</formRegionType>
<!-- <exactMessageClass>false</exactMessageClass> -->s
the region again does *not* load.

I have cleared the FRMCACHE.DAT (although I don't think it has to do
something with it...), but I suspect that is either an XML encoding thing
(the file is UTF-8 with signature - Codepage 65001, Line endings - Current
setting, Windows CRLF), or how the resource is loaded from file - something
related to this.
Or Outlook keeps the original (incorrect?) manifest and compares with the
actual content and does not hit - I'm really fishing in muddy waters here.

Anyways, if someone see this and sounds familiar, please drop me a direction
since the actual solution (to let the incorrect XML file...) is way too
random to be called a solution, and no internet search hits something
similar.

Tested on Outlook 2007 en-us, all updates to day, on Windows 7 and Windows
XP (both 64-bit).

Here is the manifest file content (notice the incorrect 's') and which
"works" (i.e. GetFormRegionStorage is called and form region is loaded).

============ START MANIFEST ============
<?xml version="1.0" encoding="utf-8"?>
<FormRegion
xmlns="http://schemas.microsoft.com/office/outlook/12/formregion.xsd">
<name>DLC.DetailsUrl</name>
<formRegionName>DLC Details</formRegionName>
<title>Details</title>
<!-- <exactMessageClass>false</exactMessageClass> -->s
<formRegionType>adjoining</formRegionType>
<showInspectorCompose>false</showInspectorCompose>
<showInspectorRead>true</showInspectorRead>
<showReadingPane>false</showReadingPane>
<addin>OLDlc.Connect</addin>
<!-- <hidden>true</hidden> -->
<!-- <version>1.0</version> -->
<icons>
<!-- icons -->
<default>addin</default>
<unread>addin</unread>
<read>addin</read>
<replied>addin</replied>
<forwarded>addin</forwarded>
<unsent>addin</unsent>
<submitted>addin</submitted>
<signed>addin</signed>
<encrypted>addin</encrypted>
<window>addin</window>
<recurring>addin</recurring>
<!-- page -->
<page>addin</page>
</icons>
</FormRegion>
============ END MANIFEST ============

Thanks,
Cristian Amarie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top