Link to home
Start Free TrialLog in
Avatar of OrenRozen
OrenRozenFlag for Israel

asked on

VS project I created using C# crashes on other systems with exception error 80040154

Hi,

I create a small project to open the 'Select Users or Groups' dialog window.
On my system (Windows 7 x64 + VS2010) the project is working with no problems.
On other systems (server2008 x64, server2003 x86) I get an exception error.
Maybe I'm missing(?) some files?

Thanks.
project.zip
Avatar of Dmitry G
Dmitry G
Flag of New Zealand image

Probably, latest .Net version is not installed on these computers.
Could you please show what the error is?
Error - I mean error message...
Avatar of OrenRozen

ASKER

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E064BB22-22CE-4E01-BB63-10EF4058CAF9} failed due to the following error: 80040154.
   at SelectUsersOrGroups_CSharp.UsersOrGroupsFrm.btnUsersGroups_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SelectUsersOrGroups_CSharp
    Assembly Version: 1.0.3829.34334
    Win32 Version: 1.0.3829.34334
    CodeBase: file:///D:/SelectUsersOrGroups_CSharp.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Interop.ObjectPickerHelper2Lib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Interop.ObjectPickerHelper2Lib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

vs 2010 is probably using .net frame work 4.0. This would need to be installed on any other computer to run. Did you create an installer for your program, it would grab the required dll's needed to run your program on another machine. Are you using any 3rd party controls? Another way to debug this problem is to use the RegMon utility, available for free at www.sysinternals.com.  It shows you how your app uses the registry.  Run it on yours and run it on the other machine and compare the two.

My 2 primary suggestions would be .net 4.0 not on the other machine, and make an installer so it grabs the dlls needed to run the app.
- .NET 4.0 is not the problem as in Server 2008 R2 it is already installed.
- I created an installer but it didn't solve the problem.
- tried regsvr32 the .dll file but got an error that the "...entry-point DllRegisterServer was not found." BTW, I get the same error if I try to register the file on my machine where the application is working.
- regmon is no longer available and was replaced with ProcessMon. never used it and don't really know what to look for.
ASKER CERTIFIED SOLUTION
Avatar of OrenRozen
OrenRozen
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial