Building Azure Functions, SQL database improvements and more – Azure Toolkit for Rider 2019.1

Over the past few weeks, we have been busy making a number of improvements to the Azure Toolkit for Rider release. Hard work pays off! Rider 2019.1 introduces support for Azure Functions (V2), with project and item templates for C# and F#, debugging and deployment right from within the IDE.

We’ve also improved SQL Database functionality with support for adding a firewall rule, creating new database servers and new databases. Let’s look at these in more detail!

Azure Functions project and item templates

After installing the Azure Toolkit for Rider, a new project template becomes available: Azure Functions. This project template does require the Azure Functions Core Tools to be installed, which Rider can help us with. We will determine the correct version for your system, and then download and extract the Azure Functions Core Tools. Rider will also notify us when updates are available.

Manage Azure Functions Core Tools

Once done, the Azure Functions project template becomes available, where we can create a new C# or F# Azure Functions project.

Create new CSharp or FSharp Azure Functions project in Rider

Next, we will have to build our functions. Rider provides item templates for common triggers (Timer, HTTP, Blobs, Queues, Service Bus, EventGrid, …). When using these templates, Rider will automatically install any required NuGet package references, such as the Microsoft.Azure.WebJobs.Extensions.Storage when using any of the storage-based triggers.

Azure Functions item templates for common triggers

Running and debugging Azure Functions

When opening or creating a project, Rider will check for the presence of a host.json file and a package reference to Microsoft.NET.Sdk.Functions to determine whether it is an Azure Functions project. When that is the case, we can run and debug our project – whether C# or F#.

From the Run | Edit configurations… menu (or from the toolbar), we can create a new run configuration of the type Azure Functions host. This will let us select the project to run or debug, set environment variables and so on.

Run/debug configuration for Azure Functions in Rider

After saving, we can hit F5 (or use the Run | Debug menu) and start debugging our functions! Like with debugging any other application, Rider lets us inspect the call stack, variables, and we can step through code as well. Even external code!

Debug Azure Functions with Rider

Managing and deploying Azure Function apps with Rider

The Azure Explorer tool window lets us browse various resources. This new release adds a new node where we can start/stop/restart/delete our Azure Functions apps, as well as edit application settings. The Azure Explorer also lists individual functions contained in a Function App.

Manage Azure Functions properties

Of course, before we can manage an Azure Function app, we will have to deploy it. We have added a new run configuration type just for that, similar to how Rider supports deploying Azure web apps.

From the Run | Edit configurations… menu (or from the toolbar), we can create a new run configuration of the type Azure – Publish Function App. In this run configuration, we can select an existing function app or create a new one to deploy into.

Publish Azure Function app with Rider

Azure SQL Database tools improvements

The latest Azure Toolkit for Rider comes with several improvements for working with Azure SQL Databases. We could already explore and connect to Azure SQL databases and database servers, but there was one step missing: configuring the firewall. Rider can now add a firewall rule for our public IP address.

Add Azure SQL database firewall rule from Rider

From the Azure Explorer tool window, we can now create new databases, as well as new database servers. Rider lets us configure the resource group, location, database size and so on.

Create Azure SQL database (server)

Other updates and improvements

Next to Azure Functions support and additional Azure SQL database functionality, we’ve fixed a number of bugs in Azure Cloud Shell support. We also fixed an issue where web app publishing settings not always saved correctly.

Download Rider 2019.1, install the Azure Toolkit for Rider and give it a try! We would love to hear your feedback.

About Maarten Balliauw

Maarten Balliauw is a Developer Advocate at JetBrains, working on .NET tools. He focuses on .NET, Azure, web technologies and application performance. Maarten is a frequent speaker at various national and international events. In his free time, he brews his own beer. Follow him on Twitter or check his personal blog.
This entry was posted in How-To's and tagged , , , , , , . Bookmark the permalink.

4 Responses to Building Azure Functions, SQL database improvements and more – Azure Toolkit for Rider 2019.1

  1. vaz says:

    It does not work on macOS. I have the functions core tools installed via brew and in the path to the functions i specify /usr/local/bin (which is where the symlink to the brew Cellar resides) . It recognises it but the project stays greyed out and i still asks me to install the functions core tools

  2. Robert Wagner says:

    If the “Download latest version…” link is greyed out, run:

    npm i -g azure-functions-core-tools –unsafe-perm true

    And then set the path to

    C:\Users\rober\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin

Leave a Reply to Robert Wagner Cancel reply

Your email address will not be published. Required fields are marked *