Windows CE 控制台输出转换字符串
我创建了一个在 Windows CE 设备上运行的 C# 控制台应用程序。到目前为止,我的程序中有一行代码:
Console.WriteLine("Hello World");
屏幕上的输出:11
11 是字符串的长度,那么是否有什么东西将我的字符串转换为字符数组或其他东西?
我正在使用从 BSP 创建的 SDK 来定位我的设备。此外,BSP 还包括用于操作系统的 .NET 2.0 和 .NET 3.5,并且我使用 Visual Studio 2005 作为我的控制台应用程序。
有人在 .NET 控制台应用程序中见过这种情况吗?谢谢。
更新:我尝试创建一个基本的 Windows 窗体应用程序并在我的设备上运行它。这次我得到了一个实际错误“System.Windows.Forms dll 找不到”,这表明 .NET 没有正确安装。我已将其包含在 Platform Builder 目录中,因此我不确定还可能缺少什么。有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我绝对没见过这种情况,而且我见过很多CF行为。
首先,不要将CF 2.0和3.5放入操作系统中。曾经。由于 SYSGEN 重叠,它们不能和平共存于操作系统映像项目中,而且这是不必要的,因为 3.5 运行时可以加载和运行 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?
我终于让它工作了,但我仍然不确定确切的问题是什么。
“修复”是从全新安装 Windows XP、Visual Studio 2005 和 Windows Embedded CE 6.0 以及所有最新的 QFE 开始。
重建操作系统映像后,我的两个测试应用程序开始按预期工作。
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.