0

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 .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?

2
  • I do a lot of Windows Mobile development, and sometimes the typical overloads are not available. Look at the parameters to Console.WriteLine() in your SDK. I do not run with this particular SDK, so this may not be your answer. Commented Apr 12, 2011 at 18:40
  • Thanks. I did take a look and the intellisense does contain an overload for a string parameter Commented Apr 12, 2011 at 20:59

2 Answers 2

0

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?

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the advice. I removed one of the .NET frameworks so only one is installed in the OS image but that didn't help me. Yes, I am running the app from VS 2005 with a breakpoint set on my one and only line of code in the program
What happens if you do a Debug.WriteLine("Hello World") call?
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.