How to change debug port in Visual Studio 2017? I checked the property pages but to no avail.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
For me, I was able to find it with the following steps in Visual Studio 2017:
- Right click on the web project, then click Properties.
- Click on the Debug tab.
- Under the Profile IIS Express, you will find the port at the App URL box.
回答2:
Go into the .sln file and edit the port there.
For example, if it's currently on port: 50722
Then just do a replace: 50722
replace with: 50723
and it should build just fine. There should be about 5 spots it'll replace.
回答3:
Project file properties
In VS 2017, I was able to update it in the project properties, instead of the solution properties.
Right-click on your project file, then choose Properties.
On the Web tab find the Project Url section. It should say something like
https://localhost:44348/
Simply modify it to your desired port number and save.