CLR20r3 error in VS2010 application - System.InvalidOperationException


I have googled this for a couple of days and not found an answer for my situation ... I'll explain the details:

1) My application works perfectly in development, my test scenario of 2 different SBS 2008 servers both fail on launch with the error "<application> has stopped working" ..

Problem Event Name:  CLR20r3
Problem Signature 1: <application>.exe
Problem Signature 2:
Problem Signature 09:  System.InvalidOperationException

2) The application is developed to be released in April, hence my use of Visual Studio 2010 RC  and originally the Dot Net 4 framework.  I will move to the released VS2010 / Dot Net 4 as soon as they are available (mid April I believe).
3) I had the application working under Dot Net 3.51, but updated to Dot Net 4 and it would not install on the target server
3) I reverted to dot Net 3.51 and the application started failing on SBS2008

I have tried running ProcMon (as per many people's suggestions) but cannot find a definitive "file not found", or error using this ... I notice that it does reference some Dot net 4.0 DLL's, but I think this is normal as there seemed to be a Windows Update on 24-Feb-2010 which included some Dot Net 4.0 pre-release functionality (KB956250 ?).

I am at a loss, so would appreciate some help!

More information:
The application is a WinForms application
The application uses Infragistics 2010.1 controls (around 6 dll's involved)
The application uses SQL Server 2008
The application has a single EXE plus single DLL with utilities type functions in it (my own).
My live, test & development environments are 64 bit.

Thanks,  if you can help ...

Gary Burgess
Software Developer
Burgess Business Systems Pty Ltd
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.

G-BurgessAuthor Commented:
I fixed the issue .. it was the method of copying Infragistics DLL's that caused the issue.

In the project settings / Publish / Application Files, I had each of the Infragistics DLL's marked with Publish Status of "Include".  I noticed that the individual Infragistics DLL's did end up on target folder of the publish in the "Application Files" / <program><version> folder - but apparantly this is not enough.

I also needed to change the "Copy Local" under Project Settings / References for each Infragistics DLL to "True".  After doing this, the application worked without error.

Hopefully this clue will be of some use to someone.

It's a pity that the framework (if that's the guilty party) doesn't throw up an error like "Cannot find Infragistics2.Shared.dll" ... that would have saved me a couple of wasted days.


Gary Burgess

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
rostom chouacheCommented:
Thnank you
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
Editors IDEs

From novice to tech pro — start learning today.