I am trying to start a simple hello world Net Compact Application written in C# on the Experimenter Kit. I am running the OMAPL138_AM18X_SAMPLE OS Design which is downloaded through Ethernet onto the device. I am using Visual Studio and Windows CE platform builder which was supplied with the Experimenter Kit (180 days trial). I created the 'Visual C# / Smart Device / Windows CE 5.0' application and built it then I copied the .exe file into 'C:\WINCE600\OSDesigns\OMAPL138_AM18X_SAMPLE\OMAPL138_AM18X_SAMPLE\RelDir\OMAPL138_AM18X_ARMV4I_Release' folder so I could see it in Visual Studio Menu 'Target / Run Programs' as I have found a tutorial which says to do this way. After trying to run it this way on the console appeared following information:
'Run Programs s NetTest
3393968 PID:400002 TID:31c0042 RELFSD: Opening file NetTest.exe from desktops NetTest 00:00:33 06/11/2012 GMT (czas letni)End s NetTest 00:00:33 06/11/2012 GMT (czas letni)'
but nothing appeared on the LCD screen (the windows shell was visible all the time). When I launched for example the 'ddex' file in the same way it started to do its stuff on the screen. So the question is how I should launch this application to make it working?
Best regards,
Damian Gowor
Hi Damia Gowor,
When you compile your platform image, did you enable .NET Compatct Framework 3.5 ~?
HB
I have a possibility of choosing Net 2.0 in the 'wizzard' not 3.5. Of course it is enabled. Is the way that I am doing the proper way of starting applications? How can I make it starting automatically when Windows starts?
Dear Damian Gowor,
In my experience, yes, you need to enable .NET 3.5 version (and remove .NET2.0).
You can google "[HKEY_LOCAL_MACHINE\init]" to run an application when wince starts.
Hello,
When I compiled the OS with Framework 3.5 the application is starting but I am receiving following error:
Run Programs s CompactNetTest 19515 PID:400002 TID:3ba0062 RELFSD: Opening file CompactNetTest.exe from desktop 19775 PID:400002 TID:3ba0062 RELFSD: Opening file CompactNetTest.exe from desktops CompactNetTest 09:42:34 06/12/2012 GMT Daylight TimeEnd s CompactNetTest 09:42:34 06/12/2012 GMT Daylight Time
20267 PID:3a00062 TID:3ba0062 CompactNetTest.exe 20267 PID:3a00062 TID:3ba0062 Error 20268 PID:3a00062 TID:3ba0062 An unexpected error has occurred in CompactNetTest.exe.Select Quit and then restart this program, or select Details for more information.
File or assembly name 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC', 29997 PID:3a00062 TID:3ba0062 CompactNetTest.exe 29997 PID:3a00062 TID:3ba0062 Error 29998 PID:3a00062 TID:3ba0062 CompactNetTest.exeMissingMethodExceptionFile or assembly name 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC', or one of its dependencies, was not found.
I understand that some resources are missing and I tried to copy the Form resource file but it didn't help. Any suggestions?
Anybody know something about this error? The application is very simple, one button, one textbox.
Ok I resolved the problem. I will leave the solution for other people who will have this kind of problem.
To resolve this problem I added a file "appname.exe.config" where the 'appname' is the C# application name into the application folder with following content:
<configuration> <runtime> <compatibilityversion major="2" minor="0"/> </runtime> <startup> <supportedRuntime version="v3.5.7000"/> </startup></configuration>
Thread about this you can find on following website: http://msdn.microsoft.com/en-US/library/d5cd9b2c.aspx