Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ClickOnce Installation Created for VB.NET Solution Fails

Posted on 2014-12-09
4
Medium Priority
?
171 Views
Last Modified: 2015-02-27
I have a ClickOnce application that I have created for my project.  The project is in VB.NET 2013.  It does reference Interop.FXCOMEXLib.dll

I can build and publish successfully.  When I attempt to run the ClickOnce application on another system, I get the following error:

Unhandled Exception:  System.TypInitializationException:  The type initialized for 'XYZ' threw and exception.  ---> System.Runtime.InteropServices.COMException:  Retrieving the COM class factory for component with CLSID {CDA8ACB0-8CF5-4F6C-9BA2-5931D40C8CAE } failed due to the following error: 80040154 Class not Registered  (Exception from HRESULT:  0x80040154 (REGDB_E_CLASSNOTREG)).

I believe the problem is that the FAXCOMExLib dll has not be properly included in the ClickOnce application.  Although the project references this DLL, I do not believe that the dll was included in the installation.

Any guidance would be greatly appreciated.

Thanks In Advance
0
Comment
Question by:mjs082969
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 40490754
An interop is only a bridge between .NET application and a COM dll (COM is the technology that came before .NET). It does not contain the code that does the job, simply .NET code that knows how to communication with the COM dll and translate data that does not have the same format (such as dates) back and forth.

Installing the interop is useless if you do not also install the dll that the interop calls. It might be called FXCOMEXLib.dll
(without the interop in front of it), but it may also have name.

ClickOnce has not been designed to deploy COM dlls with its basic functions, you need to take the special measures explaines in Deploying COM Components with ClickOnce in order to do it.
0
 

Author Comment

by:mjs082969
ID: 40491584
Can I ask, I am relatively new to ClickOnce deploying.  I used to use InstallShield quite a bit (I believe the Express edition, which is basically picking a bunch of checkboxes and no scripting).  Is ClickOnce widely used?  Are there other options I should be considering?
0
 
LVL 40
ID: 40491661
Yes, ClickOnce is widely used, because it makes it so easy to distribute updates.

But mainly for in-house development. You rarely see it used for commercial applications. The reason is that it has some limits that makes it harder if not impossible to use when you do not have control over the user's equipment. The special deployment of COM dlls, the fact that you have basically no control over the location of the installation and that you cannot install .NET dlls in the GAC are the most common limitations.

ClickOnce has been designed for in-house deployment. When you use old COM dlls, it is often because they were used by older applications and are already installed on the user computers, so no need to distribute them. Installations in the GAC are done separately by administrators. So, in most situations, they are not required in the ClickOnce install.

If these limitations are a hindrance, then go back to InstallShield. A free light version is available through Visual Studio, and you can move to the commercial edition if your need require more than what the free version offers.
0
 

Author Comment

by:mjs082969
ID: 40491808
Jacques,

Thanks again.  I am working through some of the documentation to get my COM dll into my ClickOnce now....
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question