By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,659 Members | 940 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,659 IT Pros & Developers. It's quick & easy.

ClickOnce fails on assembly containing Win32 resource

P: n/a
If anyone can help me with this I would really appreciate it:
I have an assembly into which I have linked a manifest file as a Win32
resource. This is necessary since I want to use a class in this assembly with
registration-free COM interop from a Win32 application.
I also want to use this assembly with a .Net application that I want to
deploy using ClickOnce. However when I try to install the application from
the deployment location I get the following error:
* Activation of \\myhost\deploy\MyApp\MyApp.application resulted in
exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded
assembly MyAssembly.dll.
If I remove the manifest file as a Win32 resource from the assembly the
deployments works fine. However, then I can't use the assembly for
registration-free COM interop with my Win32 application.
More information:
The guidelines I followed for the registration-free COM interop can be found

One thing that I have found is that csc.exe does not generate and link the
regular Win32 version resource into the assembly when one manually links
another Win32 resource into the assembly (see the help on the /win32res
compiler options on MSDN). I have confirmed this to be the case and have
since tried to manually include a Win32 version resource in the assembly. In
this resource I tried to reproduce the exact version information that csc.exe
would generate from the assembly information. So far this has proved
fruitless. All the tools that I have used to compare my "manual" version
information with that which the C# compiler would generate show that the
information is identical. ClickOnce still does not like it.
So far I have used:
* The version information tab on explorer's properties sheet for the
* A custom utility that uses the System.Diagnostics.FileVersion and
Microsoft.VisualBasic.ApplicationServices.Assembly Info classes.
* Version Information Spy (
(This has given me the most complete information to date)

To link the manifest and version resources into the assembly I added a .rc
file to the project with the necessary information.
I then added a pre-build event to the project to use rc.exe to compile the
..rc file to a .res file.
Then I added the following property group to the project file:
A possible solution would be to build two versions of the assembly: one
without the manifest resource for my .Net app deployed with ClickOnce.
One with the manifest for use with registration-free COM interop for my
Win32 application. I would prefer not to do this though (if someone slips up
with the builds or doesn't track the versions correctly one of the apps won't
run or deploy)

Any ideas?

Jan 26 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.