views:

406

answers:

5

I'm converting a VB6 app to use a Manifest for Reg Free deployment.

I created a manifest with Make My Manifest but when I run the app I get an error (below).

I want to make sure that my manifest isn't somehow invalid. (I opened it up and it looks Ok except for some unprintable characters, which seems odd for an XML format file.

**--------------------------- C:\Bungalow\tutor\tutor.exe

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

OK**

Excerpt from Manifest that has non printable characters

<file name="THREED32.OCX">
    <typelib tlbid="{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}" version="1.0" flags="control" helpdir="" />
    <comClass clsid="{0BA686AA-F7D3-101A-993E-0000C0EF6F5E}" tlbid="{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}" progid="Threed.SSCheck" description="A three-dimensional check box.               ***\ 1     ª8! DOCUME~1  D   ï¾1×°¬:÷   D o c u m e n t s   a n d   S e t t i n g s   ***   " />

I deleted all of the non printable characters

+1  A: 

If you're on Vista/Server08 use the sxstrace.exe command-line tool from an elevated prompt before running your app; it may give you additional information.

Additionally, look at the Windows event log, manifest parse failures are reported there.

I'd also suggest adding the "regfreecom" tag to this question.

Eugene Talagrand
Good idea about retagging regfreecom, I'll do it now. I will also vote you +1 to move you nearer to the magic 500 rep and the ability to retag questions yourself. You're nearly there :)
MarkJ
A: 

Here's an excerpt from the Troubleshooting section of an MSDN article on reg-free COM. As in Eugene's answer it suggests looking at the event log in Windows Server (maybe with Virtual PC?).

First get ... your client working with a registered server; then unregister the server and verify that your error message is what you expected; and finally... craft and deploy manifest files. This way your troubleshooting efforts ... will be confined to the structure of your manifest files (and the correct embedding of the assembly manifest if you choose to do so).

When troubleshooting registration-free COM issues, the Event Viewer on Windows Server 2003 is your friend... look in the System Event Log for events from the COM server. I don't suggest that you look at the Windows XP Event Log... it will invariably contain a message... which doesn't help identify the problem.

MarkJ
A: 

I don't know if this could be your problem but if you are including the manifest in a res file I believe it has to have a size exactly divisable by 4 bytes (don't ask me why)

Gary
MMM takes care of this automatically.The reason the resource must be a multiple of 4 bytes is that resources are always padded to a DWORD boundary with NULs (0 bytes) if they fall short. This would be invalid XML.
Bob
Thanks!, I had always wondered about that.
Gary
A: 

Starting with version 0.6.7, Make My Manifest handles the escaping of "odd" characters and symbols better. This version has only a few changes from 0.6.6 so updating should not cause most people any problems.

The new version should handle large COM interface version numbers better too. This should help programmers who have trouble managing interface binary compatibility (or who ignore compatibility).

Bob Riemersma
A: 

You may want to check that you aren't linking in libraries compiled with different versions of Visual Studio .. (assuming that is what you are using)

I've had a problem very similar to this ... same error message ... after I moved an application from VS2005 to VS2008. The error was because it was linking in a library built in a separate solution which I hadn't moved to VS2008. The release version worked fine, but the debug version hit this error.