Application doesn't start

4

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

c#
asked on Stack Overflow Jun 13, 2010 by Jayesh • edited Sep 5, 2018 by AustinWBryan

3 Answers

3

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

answered on Stack Overflow Jun 13, 2010 by Mitch Wheat
1

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

answered on Stack Overflow Jun 13, 2010 by Jayesh • edited May 23, 2017 by Community
0

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.

answered on Stack Overflow Jun 13, 2010 by James Santiago

User contributions licensed under CC BY-SA 3.0