WinIot Core v.10.0.16299.15 - RP3 - Microsoft Visual Studio远程调试器,MSVSMON未运行

问题描述 投票:0回答:1

这不是我在Pi上使用WinIoT的第一个项目。我从第一个版本开始就一直在使用WinIot图像。我决定将所有Pis更新为最新的WinIoT图像。我的VS已更新至2017年15.15.2的最新版本。

当我去远程调试我的应用程序时,它在部署过程中失败并出现此错误:

1>Error: Unable to connect to the Microsoft Visual Studio Remote Debugger named '[iphere]'.  The Visual Studio 2017 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.

所以我进入WinIot图像,然后单击“启动远程调试器”并返回此文本:

enter image description here

Failed to start the Visual Studio Remote Debugger. The Remote Debugger needs to be copied to the device. This can be done by deploying an application to the device using Visual Studio.

所以,然后我按照列出的链接,它基本上只是关于如何做我正在做的事情的说明......确切地说。 https://docs.microsoft.com/en-us/windows/iot-core/develop-your-app/AppDeployment

我已经花了几个小时在这上面而且无处可去。似乎MS现在有VS推出它的远程调试器,但由于某种原因它不起作用。

调试配置文件:enter image description here

我检查过的事情:

  • Windows防火墙关闭
  • 重新安装WinIot Image以重新开始
  • 开始了一个没有代码的新UWP项目
  • 设置构建详细程度很高,但在构建时没有问题,只有部署
  • 使用windows powershell命令将WinIoT映像添加到我的可信主机
  • 能够远程使用PowerShell,没有问题。
  • 在我的PC上禁用了IPv6(在ping主机名时ping显示IPv6)

我注意到的事情:

  • 当我第一次能够使用它时,我看到MSDN上的指令显示“通用”进行身份验证 - 当我从可用的Pi3列表中选择时,它会在一点上将其移回“无”,我是能够使用'None'进行部署和调试,但现在即使现在也无效。
  • 在线MSDN说明似乎与不再可用的命令一起使用,例如如何启动远程调试器 -
  • 似乎无法找到一种方法来启动远程调试器并手动启动它(如果这甚至可以工作)

我觉得因为我之前能够做到这一点,在这个图像版本的最后一周,必须有一些环境,但我已经用尽了时间试图找出它我宁愿编码而不是调试调试过程。

非常感谢任何帮助。

uwp visual-studio-2017 windows-10-universal remote-debugging windows-10-iot-core
1个回答
1
投票

你不应该在现代Windows中禁用ipv6。在XP-days中可能已经可以接受了,但现在它真的会搞乱你的系统。有关详细信息,请参阅this post并重新启用它。如果可能的话,从Raspberry pi上的新图像开始。然后,您应该清除用户配置文件上的缓存凭据,打开命令提示符并键入:

rundll32.exe keymgr.dll, KRShowKeyMgr

如下图所示,您应该使用minwinpc或设备的主机名/ IP地址删除所有内容

enter image description here

接下来,您需要使用从Visual Studio Marketplace下载的模板之一创建一个新的虚拟c#iot项目

enter image description here

现在右键单击项目并选择属性

enter image description here

输入调试信息,如下所示。它应该使用未加密的协议

enter image description here

单击“远程Windows调试器”

enter image description here

手术需要一些时间

enter image description here

最终会超时(这没关系)

enter image description here

检查以确保已部署应用程序

enter image description here

如果未部署应用程序,那么您的pc / vs配置还有其他需要修复的问题。修复此问题的最快方法是blow away your user profile on the local pc,但您只应该这样做,因为您必须重新导入浏览器收藏夹,网络驱动器和电子邮件设置。

假设虚拟解决方案的部署工作,然后使用powershell连接到设备并发出这些命令

cd c:\data\users\defaultaccount\appdata\local\developmentfiles\vsremotetools
netsh advfirewall firewall add rule name="Remote Debugging TCP Inbound" dir=in action=allow protocol=TCP localport=4022
netsh advfirewall firewall add rule name="Remote Debugging TCP Inbound" dir=in action=allow protocol=TCP localport=4023
netsh advfirewall firewall add rule name="Remote Debugging UDP Inbound" dir=in action=allow protocol=UDP localport=3702
(Start-Process -FilePath "xcopy" -ArgumentList "*.* c:\temp\rdbg /y /s /i /d /h" -Wait -Passthru).ExitCode
(Start-Process -FilePath "c:\temp\rdbg\arm\msvsmon.exe" -ArgumentList "/silent /nostatus /nosecuritywarn /nofirewallwarn /noclrwarn" -Wait -Passthru).ExitCode

如果浏览到http://minwinpc:8080/#Debug(如下所示),你应该看到msvsmon正在运行enter image description here

现在,将Visual Studio项目中的远程调试设置更改为Windows身份验证enter image description here

然后单击“启动远程调试”

© www.soinside.com 2019 - 2024. All rights reserved.