WinIot Core v.10.0.16299.15 - RP3 - Microsoft Visual Studio 远程调试器,MSVSMON 未运行 [英] WinIot Core v.10.0.16299.15 - RP3 - Microsoft Visual Studio Remote Debugger, MSVSMON not running

查看:61
本文介绍了WinIot Core v.10.0.16299.15 - RP3 - Microsoft Visual Studio 远程调试器,MSVSMON 未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

1> 错误:无法连接到名为[iphere]"的 Microsoft Visual Studio 远程调试器.Visual Studio 2017 远程调试器 (MSVSMON.EXE) 似乎未在远程计算机上运行.这可能是因为防火墙阻止了与远程计算机的通信.请参阅帮助以获取有关配置远程调试的帮助.

所以我转到 WinIot 图像,然后单击启动远程调试器"并返回以下文本:

未能启动 Visual Studio 远程调试器.需要将远程调试器复制到设备.这可以通过使用 Visual Studio 将应用程序部署到设备来完成.

所以,然后我按照列出的链接,它基本上只是关于如何做我正在做的事情的说明......完全正确.

我检查过的东西:

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

我注意到的事情:

  • 当我第一次能够让它工作时,我看到 MSDN 上的说明显示通用"进行身份验证 - 当我从可用 Pi3 列表中进行选择时,它一度将其移回无",我能够使用无"进行部署和调试,但现在即使这样也不起作用.
  • MSDN 在线说明似乎已过时,这些命令不再可用,例如如何启动远程调试器 -
  • 似乎无法找到一种方法来打开远程调试器并手动启动它(如果这可行的话)

我觉得因为我之前能够做到这一点,在上周的这个图像版本上,一定有一些环境问题,但我已经用尽了我的时间试图弄清楚我宁愿编码而不是调试调试过程.

非常感谢任何帮助.

解决方案

您不应在现代 Windows 中禁用 ipv6.它在 XP 时代可能是可以接受的,但现在它真的会弄乱你的系统.请参阅

接下来您需要使用从

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

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

单击远程 Windows 调试器

操作需要一些时间

最终会超时(没关系)

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

如果应用程序未部署,那么您的电脑/vs 配置还有其他问题需要修复.修复此问题的最快方法是

现在把visual studio项目中的远程调试设置改成Windows身份验证

然后点击开始远程调试

This isnt my first project with WinIoT on a Pi. I have been using the WinIot image since its first version. I decided to update all my Pis to the latest WinIoT image. My VS is updated to the latest version 2017 15.15.2.

When I go to remote debug my application, It fails during the deploy process with this error:

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.

So I go onto the WinIot image, and click on the "Start Remote debugger" and it returns this text:

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.

So, then I follow the link listed, and its basically just instructions on how to do what I am doing... exactly. https://docs.microsoft.com/en-us/windows/iot-core/develop-your-app/AppDeployment

I have spent hours on this and am getting nowhere. It seems that MS now has VS put up its remote debugger, but for some reason its not working.

Debug Profile:

Things I have checked:

  • Windows Firewall off
  • Reinstalled the WinIot Image to start fresh
  • Started a fresh UWP project with no code in it
  • Set build verbosity high, but did not have issues on the build, only the deploy
  • Added the WinIoT image to my trusted hosts with the windows powershell commands
  • Was able to remote in with PowerShell, no issue there.
  • Disabled IPv6 on my PC (pings were showing IPv6 when pinging the host name)

Things I have noticed:

  • When I first was able to get this to work, I saw that the instructions on MSDN are showing "Universal" for Authentication - When I select from the list of available Pi3, it moves it back to 'None' at one point, I was able to deploy and debug with 'None', but now even now that does not work.
  • MSDN Instructions online seem to be dated with commands that are no longer available to run such as how to start the remote debugger -
  • Cant seem to find a way to put the remote debugger on and manually start it (if that would even work)

I feel that because I was able to do this before, in the last week on this image version, that there must be something environmental, but I have exhausted my time trying to figure it out I would rather be coding instead of debugging the debugging process.

Any assistance is greatly appreciated.

解决方案

you should not disable ipv6 in modern Windows. It may have been acceptable in XP-days, but now it will really mess up your system. See this post for more info and re-enable it. Start with a fresh image on your Raspberry pi if possible. Then you should clear your cached credentials on your user profile, open a command prompt and type in:

rundll32.exe keymgr.dll, KRShowKeyMgr

As you can see in the following picture, you should delete everything with minwinpc, or the device's hostname/ip address

Next you need to create a new, dummy c# iot project using one of the templates downloaded from Visual Studio Marketplace

Now Right Click the project and choose properties

Enter the debug information as shown below. It should use unencrypted protocol

Click Remote Windows Debugger

The operation will take some time

Eventually it will time out (this is ok)

Check to ensure that the application was deployed

If the app wasn't deployed, then you have further problems with your pc's / vs configuration that need to be repaired. The quickest method to repair this is to blow away your user profile on the local pc, but you should only do this as a last resort, as you will have to re-import your browser favorites, network drives and e-mail settings.

Assuming the deployment of the dummy solution worked, then connect to the device using powershell and issue these commands

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

You should see msvsmon running if you browse to http://minwinpc:8080/#Debug (as shown below)

Now this time, change the remote debugging settings in the visual studio project to Windows authentication

then click Start Remote Debugging

这篇关于WinIot Core v.10.0.16299.15 - RP3 - Microsoft Visual Studio 远程调试器,MSVSMON 未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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