Problems running program

Background: I have a program that has been running for years on a handheld scanner, using Win CE, developed in visual studio 2008 for a .net 3.5 environment.  

I need to get the same program running in a Windows 7 desktop environment, so I copied all the code to a "Windows Forms Application" project, i.e. a typical desktop app.  One thing I was worried about was that in the handheld device I always used a reference for System.Data.SqlServerCe for my SQL functionality, but to my pleasant surprise I was still able to use that same reference in my desktop version.

Better yet, I was able to deploy the project, and it appears to work great on my Windows 7 desktop PC.  It even created my SQL .sdf files just as it always does on the handheld device, and let me update my tables as usual with no errors.

So here is the problem: if I browse to the folder where the .exe was created during the deploy, and try to run it, I get an ambiguous error about how it has stopped working.  If I go to problem details, I see things such as "Stopped working", event name "CLR20r3", and Problem Signature 09 "System.InvalidOperationException".

Note that I have not installed the SQL .cab files on my PC, as I always had to do on my handheld device.  I tried to, but could not get DISM to work without an error.  Even so, like I say, when I deploy it from visual studio 2008 it works just great.

Any ideas what I'm doing wrong, and what I can try at this point?  TIA
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

What you want to do is get the crash dump and open it with Visual Studio in order to view the call stack.  This will tell you where it is failing.

To get the crash dump, first ensure that you have the following registry keys set:

HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\ForceQueue = 0x1 HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\Consent\DefaultConsent = 0x1

Re-run your application and let it fail.  Look in - C:\ProgramData\Microsoft\Windows\WER\ReportQueue.

You should find your crash dump there.


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
Visual Basic.NET

From novice to tech pro — start learning today.