471,088 Members | 1,235 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,088 software developers and data experts.

ClickOnce fails on assembly containing Win32 resource

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
here: http://msdn2.microsoft.com/en-us/library/ms973915.aspx

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 (http://www.delphidabbler.com/software?id=vis)
(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
0 1671

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Namratha Shah \(Nasha\) | last post: by
5 posts views Thread by Danny Tuppeny | last post: by
1 post views Thread by code | last post: by
2 posts views Thread by Michael D. Reed | last post: by
3 posts views Thread by Peter Carlson | last post: by
3 posts views Thread by =?Utf-8?B?S2VuIExlbWlldXg=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.