这不是我在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图像,然后单击“启动远程调试器”并返回此文本:
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推出它的远程调试器,但由于某种原因它不起作用。
我检查过的事情:
我注意到的事情:
我觉得因为我之前能够做到这一点,在这个图像版本的最后一周,必须有一些环境,但我已经用尽了时间试图找出它我宁愿编码而不是调试调试过程。
非常感谢任何帮助。
你不应该在现代Windows中禁用ipv6。在XP-days中可能已经可以接受了,但现在它真的会搞乱你的系统。有关详细信息,请参阅this post并重新启用它。如果可能的话,从Raspberry pi上的新图像开始。然后,您应该清除用户配置文件上的缓存凭据,打开命令提示符并键入:
rundll32.exe keymgr.dll, KRShowKeyMgr
如下图所示,您应该使用minwinpc或设备的主机名/ IP地址删除所有内容
接下来,您需要使用从Visual Studio Marketplace下载的模板之一创建一个新的虚拟c#iot项目
现在右键单击项目并选择属性
输入调试信息,如下所示。它应该使用未加密的协议
单击“远程Windows调试器”
手术需要一些时间
最终会超时(这没关系)
检查以确保已部署应用程序
如果未部署应用程序,那么您的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正在运行
现在,将Visual Studio项目中的远程调试设置更改为Windows身份验证
然后单击“启动远程调试”