简体   繁体   English

如何使用设备模拟器的多个实例调试.NET移动设备应用程序

[英]How to Debug .NET Mobile Device Application using multiple instances of Device Emulator

I would like to Debug .NET Mobile Device Application using multiple instances of Device Emulator. 我想使用设备模拟器的多个实例调试.NET移动设备应用程序。 If I right click the project and go to Debug -> Start new instance in Visual Studio 2008 when an instance is already running I get the error 如果我右键单击该项目,然后在实例已在运行的情况下转到“调试”->“在Visual Studio 2008中启动新实例”,则会收到错误消息

Unable to copy file "obj\\Debug\\MyMobileApp.exe" to "bin\\Debug\\MyMobileApp.exe". 无法将文件“ obj \\ Debug \\ MyMobileApp.exe”复制到“ bin \\ Debug \\ MyMobileApp.exe”。 The process cannot access the file 'bin\\Debug\\MyMobileApp.exe' because it is being used by another process. 该进程无法访问文件“ bin \\ Debug \\ MyMobileApp.exe”,因为它正在被另一个进程使用。

Does anyone know if and how I can do this? 有人知道我是否以及如何做吗?

I just discovered a way you can (sort of) do this. 我只是发现了一种(可以)执行此操作的方法。 You can't deploy from two instances of Visual Studio to two instances of the same type of emulator, but you can deploy to instances of two different types of emulator. 您不能从两个Visual Studio实例部署到同一类型的模拟器的两个实例,但是可以部署到两种不同类型的模拟器的实例。 Although not without a small trick. 虽然不是没有小技巧。

To see how this works, open two instances of Visual Studio, and open the same CF project in each. 若要查看其工作原理,请打开Visual Studio的两个实例,然后在每个实例中打开相同的CF项目。 Next, you need to manually start two emulators. 接下来,您需要手动启动两个仿真器。 Find the file dvcemumanager.exe (it should be in C:\\Program Files\\Microsoft Device Emulator\\1.0 ) and run it. 找到文件dvcemumanager.exe (它应该在C:\\ Program Files \\ Microsoft Device Emulator \\ 1.0中 )并运行它。 To start an emulator, select it and then click Actions | 要启动仿真器,请选择它,然后单击“操作” |“启动”。 Connect. 连接。 For this example, start the regular emulator and the VGA emulator (and wait for them to fully come up, of course). 对于此示例,启动常规仿真器和VGA仿真器(当然,请等待它们完全启动)。

Back in Visual Studio, set one instance's deployment target to the regular emulator, and the other instance's target to the VGA emulator, and start each. 返回Visual Studio,将一个实例的部署目标设置为常规仿真器,将另一个实例的目标设置为VGA仿真器,然后启动每个实例。 Each app will be deployed to the appropriate already-running instance of the emulator. 每个应用程序都将部署到适当的已经在运行的模拟器实例中。

You can't use this technique to run two versions of the same type of emulator, because there doesn't seem to be any way of doing that from the device manager interface. 您不能使用此技术来运行同一类型的仿真器的两个版本,因为从设备管理器界面似乎没有任何方法可以执行此操作。 Also, you can't just start two instances of VS and set them to different emulators - I tried that and it doesn't work. 另外,您不能只启动两个VS实例并将它们设置为不同的仿真器-我试过了,它不起作用。 For some reason the second one tries to deploy to the same emulator as the first, and you get the error you saw. 由于某种原因,第二个尝试与第一个部署到相同的仿真器,并且您看到了错误。

You need to create additional emulator instances. 您需要创建其他仿真器实例。 This answers how Is there a good way of switching between different debugging environments on windows mobile emulator 这回答了如何在Windows Mobile模拟器上的不同调试环境之间进行切换的好方法

I'm not sure I understand the question completely. 我不确定我是否完全理解这个问题。

Can't you start multiple instances of Visual Studio for the same project with each instance connected to a different emulator debugging the same application? 您不能为同一项目启动Visual Studio的多个实例,而每个实例都连接到调试同一应用程序的不同仿真器吗?

disconnect device, go to explore and delete all files and folder than was created. 断开设备连接,然后浏览并删除所有已创建的文件和文件夹。 Be sure the aplication isnt runing, (taskadmin). 确保应用程序没有运行(taskadmin)。 Conect again, rebuild, deploy, then f5. 再次连接,重建,部署,然后按f5。

Good Luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .NET在移动设备上的应用(Win CE) - .NET Application on Mobile Device (Win CE) 设备从睡眠模式唤醒后,如何确定我的移动.net应用程序为何冻结? - How can I determine why my mobile .net application is freezing after the device awakes from sleep mode? NET中的智能设备应用 - Smart device Application in .net 模拟器软重置后,模拟器未连接到Windows Mobile设备中心 - Emulator not connecting to Windows Mobile Device Center after Emulator soft reset 如何使用命令行重建.net CF应用程序并在Windows Mobile模拟器中部署 - How to rebuild .net CF application and deploy in windows mobile emulator using command-line 是否可以使用javascript或ASP.Net检测移动设备模型 - Is it possible to detect the mobile device model using javascript or ASP.Net 如何检测Windows Mobile 5设备序列号? (.NET CF 3.5) - How to detect Windows Mobile 5 Device Serial Number? (.NET CF 3.5) 在移动设备上使用nvarchar(MAX) - Using nvarchar(MAX) on a mobile device Windows 7与VS2008,移动设备仿真器不起作用 - Windows 7 with VS2008, Mobile Device Emulator Not Working .NET MAUI 应用程序仅在连接到 USB 调试器的模拟器或设备上运行 - .NET MAUI app only runs on emulator or device connected to USB debugger
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM