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