Jayesh
Jayesh

Reputation: 3951

Application doesn't start

I am having a rather strange problem, I deployed 2 .NET applications on my machine. Both run on v2.0.

Now, while one of it works smoothly, the other one doesn't even start! Moreover, it doesn't throw any error, I couldn't see any error listings in the Event Viewer.

Becoming hard to debug. On every other machine, both the exe's work perfectly fine!

Any known issues?

EDIT: I caught an Unhandled Exception and the exception is this;

System.Runtime.InteropServices.COMException (0x80040154): Class not registered(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid) at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid) at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid) at System.Windows.Forms.AxHost.CreateInstance() at System.Windows.Forms.AxHost.GetOcxCreate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.AxHost.EndInit() at BrowsingFiles.Form1.InitializeComponent() at BrowsingFiles.Form1..ctor() at BrowsingFiles.Program.Main(String[] args)

Thanks

Upvotes: 5

Views: 6181

Answers (3)

Jayesh
Jayesh

Reputation: 3951

One more solution apart from the one given by Mitch Wheat

Copy the DLL, in the System32 file at it's proper location and then using command prompt register the dll with the system using regsvr32 location-of-the-dll

Upvotes: 1

James Santiago
James Santiago

Reputation: 3062

You can go to project -> add reference to add your com component. Make sure you have the com component loaded on this system. You can go and view the references on your previous machine and see where the references are located and modify this new machine accordingly.

Upvotes: 0

Mitch Wheat
Mitch Wheat

Reputation: 300499

You are calling a COM component that is not registered on that machine.

Ideally, your deployment project would register any COM dependencies: How To Register COM Objects in Visual Studio .NET: Steps to Register a COM Module in a Visual Studio .Net Deployment Project

Upvotes: 3

Related Questions