473,418 Members | 2,053 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,418 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 1892

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.