Visual Studio 2005 - dll issue.

Hello All,

This is my first question in experts exchange. Thanks for maintaining this site.

I had heard about it through my friends.

I'm having a production issue. last friday we dropped couple of dll's into production and from then onwords one of the user is getting below issue.

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

************** Exception Text **************
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark)
   at System.Reflection.Assembly.GetTypes()
   at Utilities.WorkFlowStep.Invoke()
   at Utilities.OtherWFStep.Run()
   at SfgShell.MainForm.WorkflowStepRun(WorkFlowStep& wfStep, String methodId, String application, String methodPath, String runLocation, String stepDesc, String dbServer, String dbName)
   at SfgShell.MainForm.grdWorkflowSteps_Run(Int32 row, Int32 col)
   at SfgShell.MainForm.grdWorkflowSteps_ClickedButtonRowCol(Int32 row, Int32 col)
   at WindowsControls.CustomGrid1.HandleCellButtonClick(Object sender, DataGridCellButtonClickEventArgs e)
   at WindowsControls.DataGridButtonColumn.HandleMouseUp(Object sender, MouseEventArgs e)
   at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.DataGrid.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.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 **************
    Assembly Version:
    Win32 Version: 2.0.50727.1873 (QFEN-1.050727-1800)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.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 section.
The application must also be compiled with debugging

For example:

    < jitDebugging="true" />

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.

Not all the users are facing this issue. only one user is facing this issue, when the user tries to access dropped components. others are able to access those components without any difficulty.

We are using Visual Stuido 2005 and operating system is XP Professional.

Please let me know what may be causing this issue.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Can you run cordbg on that computer? It can be copied from your dev machine. I consists of 2 files:

If yes then run your app under cordbg:
  cordbg MyApp.exe

After cordbg has finished loading your app enter
  ca e
command to tell cordbg to catch all first-chance exceptions.
Then run your app by entering
Probably you'll need to do it several times until you get your error. When the error occurs look at local variables, stack, ...
MEDIZAuthor Commented:
Hi Mike,

I will try the above options. Just want to let you know, The person who is getting error is running the exe shortcut which is on server. Can I run cordbg.exe on the shortcuts also.

Any how I will try and I will let you know the final outcome.

meanwhile he is able to run the same components in the lower environments (dev, qc, acp) but only in the production he is getting error message.

cordbg can't run shortcuts but ordinary shortcut (non-advertised one) contains the command line to start application. In case your application parses command line and relies on number of command line arguments you can start cordbg and only then run your app from it by
  r MyApp.exe arg1 arg2 ...

Seems you have some assemblies of different version on production server.
You can try to compare versions and/or modification dates. Probably you'll be able to find the error w/o cordbg
MEDIZAuthor Commented:
Mike,  All the assemblies in both Prod and acpt are same, but unable to figure out what is the root cause of the issue. planning to reinstall .net 2.0 framework on the user's laptop to see if that fixes the issue. I will update you on that.
Then it would be better to try cordbg. If it's possible. It will give the answer.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.