本地调试.NET Compact Framework应用程序(无需仿真器或设备) [英] Debug .NET Compact Framework app locally (without emulator or device)

查看:172
本文介绍了本地调试.NET Compact Framework应用程序(无需仿真器或设备)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在准备一个新的项目的准备阶段,该项目将使用.NET Compact Framework开发(2.0或3.5版,我们将看到),并将运行在自定义的Windows CE 6硬件上。然而,有一件事我无法上班:



只有使用物理设备或仿真器,调试似乎是可能的。但是当我刚从资源管理器启动应用程序时,它在桌面上运行愉快(因为当然,CF安装在我的开发机器上,所以实际的问题是:



如何在桌面系统上调试我的.NET CF应用程序,该应用程序在桌面CF框架上运行?或者这是不可能的?如果是后者,该怎么办?创建一个非CF项目进行调试?我知道我应该在设备上进行调试,这对应用程序的后端是至关重要的,但GUI可以在桌面上进行调试,因为它使用的是OpenGL,它比仿真器运行得更快(设备有OpenGL加速)。

解决方案

一般来说,我创建2个项目一个用于桌面,一个用于CF。桌面版本是一个桌面exe,只是引用CF.dlls(这很好),显然你需要把你的主应用程序推入库,使你的实际的.exe只是一个很轻的包装(但这是非常好的设计)



在CF上没有实际运行,但是FF,所以有一些兼容性问题,你可能会注意到实现的区别。



另一个选项是使用调试Visual Studio中的选项附加到进程。这样,您可以通过双击运行应用程序,然后再附加到该进程。


I am currently in the preparation phase for a new project that will be developed with .NET Compact Framework (2.0 or 3.5, we'll see) and will run on a custom Windows CE 6 hardware. There is, however, one thing I can't get to work:

Debugging seems to be possible only with a physical device or with the emulator. But when I just start the app from explorer, it runs happily on my desktop (because, of course, the CF is installed on my development machine. So, the actual question is:

How can I debug my .NET CF app on my desktop system with the app running on the desktop CF framework? Or is this not possible? If the latter, how should I do this? Create a non-CF project for debugging? I know I should debug on the device and that is essential for the back-end of the app, but the GUI can be debugged on the desktop. Since it's using OpenGL, it runs much faster than in the emulator (the device has OpenGL acceleration).

解决方案

Generally I create 2 projects one for desktop and one for CF. The desktop version is a desktop exe that just references CF .dlls (this is fine). Obviously you'll need to push your main app into librarys and make your actual .exe just a very light wrapper (but this is quite nice design anyway)

It's not actually running on the CF but the FF so there are a few compatability issues you may notice in a difference of the implementations.

The other option is to use the debugging option in Visual Studio to "attach to process". That way you can run the app by double clicking and then just attach to that process.

这篇关于本地调试.NET Compact Framework应用程序(无需仿真器或设备)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆