Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify a base url or host port for Jetbrains Rider asp.net project

Tags:

c#

asp.net

rider

I have a C# Asp.net web project made in Visual Studio. The project runs on a certain port (57243) and I made other programs that were testing the web service etc to use "localhost:57243".

Recently I tried running the project in Jetbrains' Rider IDE because of whatever reasons I made up at the time. The only issue I am having now is that the web service runs on port 5001 and I cannot find any property to change the base url or the host port to make it work.

TLDR, I am looking for this option inside the Jetbrains' Rider IDE: enter image description here

like image 280
Wietlol Avatar asked Apr 05 '17 15:04

Wietlol


People also ask

How do I change the port number of a .NET application?

In Solution Explorer, click the name of the application. In the Properties pane, click the down-arrow beside Use dynamic ports and select False from the dropdown list. This will enable editing of the Port number property. In the Properties pane, click the text box beside Port number and type in a port number.

How do you publish on JetBrains rider?

Do one of the following: Select an ASP.NET Core project in the Solution Explorer, press Ctrl+N or right-click and choose Add, then select Publish XML. If you are editing a run configuration of the Publish to IIS type, click + next to the Publish profile field.

Does JetBrains rider require Visual Studio?

If you want to use JetBrains Rider on a copy of Windows that does not have Visual Studio installed and you are developing projects having legacy project files: Download and install the JetBrains redistributable of MSBuild (to learn more, please visit the blog post.)


1 Answers

To set the Port on JetBrain Rider v2019.1, in the solution view, open the launchSettings.json file in the Solution > Project > Properties folder. You will be able to set the applicationUrl port for both the https://localhost:{port} and http://localhost:{port}.

Make sure you restart the that app, to use the new port.

LaunchSettings.json

like image 98
SammyRNYCreal Avatar answered Oct 12 '22 20:10

SammyRNYCreal