473,231 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 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:
ERROR SUMMARY
* 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
assemblies.
* 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:
<PropertyGroup>
<Win32Resource>MyAssembly.res</Win32Resource>
</PropertyGroup>
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?

Thanks,
Chris
Jan 26 '07 #1
0 1883

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: James | last post by:
I have two question regarding the version resource that is generated for a satellite assembly. 1) I have a file in my C# console app project called StringResources.en-US.resx. When I build the...
11
by: Z D | last post by:
Hello, If I have a .NET assembly, how do I determine what version of the .NET framework it.... 1) was compiled against 2) is supposed to use 3) is compatible with? Is there a utility that...
0
by: Namratha Shah \(Nasha\) | last post by:
Hi All, Assembly linker is a tool which is used to create an assembly by combining one or more .netmodules and resource files. In simple words an .netmodule is an IL file that does not have ...
5
by: Danny Tuppeny | last post by:
I've been playing around with ClickOnce today, and it's all good stuff. Except, that if I change my application to NOT be full trust (which seems to make very little difference to the user prompt,...
1
by: code | last post by:
Here is a method I came up with to use ClickOnce with a Win32(no Clr) dll. Is there something simplier I can do? Steps for ClickOnce for a Win32(with no CLR) dll , named Win32Lib.dll. In...
2
by: Michael D. Reed | last post by:
I am using ClickOnce to distribute a program. It works well except for one detail. When a new version is installed, the program does not initialize properly immediately after the update. The...
3
by: Peter Carlson | last post by:
Our app uses the following chain of urls: 1. yoursite.com/launch.php?room=00000271 - validates the roomid appends an appropriate server variable and encrypts and adds a hash and sends on to #2 ...
3
by: =?Utf-8?B?S2VuIExlbWlldXg=?= | last post by:
My clickonce app fails when the install button on the publish.htm page is clicked. User is prompted with a "Cannot Start Application" dialog. Details provided from the dialog are: PLATFORM...
7
by: LukasMalik | last post by:
Hi all, my application (C# WinForm .NET 3.5) is distributed via ClickOnce deployment. Application should check for updates on our company web. Problem comes when any part of application has...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.