Windows CE Console output converting strings
I created a C# console application running on a Windows CE device. I have one line of code in the program so far:
Console.WriteLine("Hello World");
Output on Screen: 11
The 11 is the length of the string, so is something converting my string to a character array or something?
I am using the SDK created from the BSP to target my device. In addition, the BSP includes both .NET 2.0 and .NET 3.5 for the OS, and I'm using Visual Studio 2005 for my console application.
Has anyone ever seen this before in a开发者_StackOverflow中文版 .NET console app? Thanks.
UPDATE: I tried to create a basic Windows Forms app and run that on my device. This time I got an actual error "System.Windows.Forms dll cannot be found", so that indicates to me that .NET is not installed correctly. I have it included in the Platform Builder catalog, so I'm not sure what else might be missing. Any ideas?
I've definitely never seen this, and I've seen a lot of CF behaviors.
First, don't put CF 2.0 and 3.5 in the OS. Ever. They don't coexist in an OS image project peacefully due to SYSGEN overlaps, plus it's unnecessary as the 3.5 runtimes can load and run 2.0 binaries.
You're certain that your only code is that one line? You're certain that you're runnign the app that is the code you're seeing (i.e. it's not running an old or different version by mistake)? Are you at a breakpoint when this happens?
I finally got it working, but I'm still not sure what the exact issue was.
The "fix" was to start with a clean install of Windows XP, Visual Studio 2005, and Windows Embedded CE 6.0 with all the latest QFE's.
After a rebuild of the OS image, both of my test applications started working as expected.
精彩评论