WinIot Core v.10.0.16299.15 - RP3 - Microsoft Visual Studio Remote Debugger, MSVSMON not running

血红的双手。 提交于 2019-12-11 16:29:38

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/47954540/winiot-core-v-10-0-16299-15-rp3-microsoft-visual-studio-remote-debugger-msv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!