How to publish an ASP.NET web application to an Azure App Service from JetBrains Rider

I prefer to deploy my personal .NET projects to Azure, and frequently use App Services to host APIs and web applications. Microsoft Visual Studio has excellent integrated tools for publishing your apps to Azure, but after recently making the switch from Visual Studio 2019 to JetBrains Rider, I was pleased to see that Rider supports a variety of publishing options, including Azure and AWS. Here is a quick post on how to configure Rider and your .NET solution so it can be published to an Azure App Service.

JetBrains provides the Azure Toolkit for Rider, so add that to the IDE from here:

Once installed, configuration is straight forward. Sign in to your Azure account under the “Tools” menu > Azure > Azure Sign In…

Select “Device Login,” copy the provided code, and then open the link:

Enter the code, and login with your Microsoft account:

Once authenticated, you can then select your desired Azure subscription back in Rider:

Azure authentication is now complete, and a new Rider Run/Debug Configuration for the solution can be added. Right click the project which will be published, select “Publish…” and then select “Publish to Azure”

You have the option of creating a new Azure app from within the IDE, specifying either an existing or new subscription, resource group, and app service plan:

If you already have an Azure App Service running for this solution, or have already configured one in your Azure Portal, you can select the “Use Existing Web App” option and select the app from the “Choose App” menu:

The last step is to specify the “Before Launch” tasks. In here you can build the necessary project(s), run scripts or tasks, or even run other publish configurations:

For my simple Angular SignalR demo project, I will just build the “SignalrDemo.Server” project, and then open a browser with the app url:

Once the configuration profile is saved, I can select it from the toolbar and and click the run button or press Ctrl + F5, or select the “Run” menu > Run ‘[My Azure Publish Profile Name]’

In the “Build” output window, I can see that all app build steps were completed successfully:

And in the “Run” output window, I can see that the app was successfully published to my Azure App Service:

When complete, my browser opened the app at the url I provided in the “Launch Web Browser” task I added to the publish configuration:

Additional links:

2 thoughts on “How to publish an ASP.NET web application to an Azure App Service from JetBrains Rider

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s