远程部署/调试Visual Studio 2017 .NET Core
问题描述:
如何使用针对Net框架的Net Core应用程序在VS2017中设置远程部署+调试?
How can I set up remote deploy + debugging in VS2017 using a net core app which targets net framework?
我已经安装了远程工具,并且可以在目标设备上使用它.我可以连接到它并调试远程应用程序.
I have the remote tools installed and working on my target device. I can connect to it and debug remote applications.
我设置了一个构建配置,以将我的应用程序构建到目标计算机上的远程共享.
I have a build configuration set to build my application to a remote share on my target machine.
如何让VS在远程计算机上启动它,然后附加调试器?
How can I get VS to launch this on the remote machine then attach debugger?
答
- 在您的远程计算机上,转到 https://visualstudio.microsoft.com/zh_CN/downloads/#remote-tools-for-visual-studio-2017 下载并安装远程调试工具.
- 运行刚刚安装的"Visual Studio 2017远程调试器"应用程序
- 该应用程序将在主窗口中显示服务器名称和端口;类似于"COMPUTERNAME:4022"
- 在开发计算机上的Visual Studio中,选择远程计算机"作为运行目标.这应该会弹出一个对话框,以输入远程计算机信息.
- 如果在自动检测到"下看到您的机器,请选择它.如果不是,请使用您在手册部分的第3步中找到的服务器名称和端口.
- 您应该能够在选中远程计算机"的情况下点击播放",它将应用程序部署到远程计算机并进行调试(它可能要求远程计算机提供用户名和密码). li>
- On your remote machine, go to https://visualstudio.microsoft.com/en/downloads/#remote-tools-for-visual-studio-2017 to download and install the remote debugging tools.
- Run the "Visual Studio 2017 Remote Debugger" application you just installed
- The app will show you the servername and port in the main window; something like 'COMPUTERNAME:4022'
- In Visual Studio on your development machine, choose "Remote Machine" as the run target. This should bring up a dialog box to enter in the remote machine information.
- If you see your machine listed under "Auto Detected", select it. If not, use the servername and port you found in step 3 in the manual section.
- You should be able to "hit play" with "Remote Machine" selected and it will deploy the app to the remote machine and allow you to debug (it may ask for a username and password to the remote machine).