aspire-plugin icon indicating copy to clipboard operation
aspire-plugin copied to clipboard

Add support for Azure Functions

Open lars-houtman opened this issue 1 year ago • 3 comments

Originally a bug report, however I was made aware this was a feature request. The requested feature is as follows: add support for Azure Function Core Tools to run our Function projects with Aspire in Rider.

Original post:

Describe the bug When using Rider to start Azure Functions, they are not run with the correct Azure Function Core Tools but with the .net runtime itself.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Aspire solution
  2. Create a new Azure Functions project
  3. Reference the Azure Functions in your AppHost
  4. Add builder.AddProject<Company_FunctionApp1>("fn"); to your AppHost Program.cs
  5. Run AppHost

Expected behavior I expect the Azure Function to start normally. It does so in Visual Studio.

Screenshots The following exception is thrown and the Function does not start. image

System information:

  • OS: Windows 11
  • .NET version: 8.0
  • JetBrains Rider version: 2024.2.3
  • Aspire plugin version: bundled 1.3.0
  • Aspire workload version: 8.2.0

lars-houtman avatar Sep 06 '24 08:09 lars-houtman

Extra: the logs from the function when starting the AppHost via Visual Studio are as follows: image

lars-houtman avatar Sep 06 '24 08:09 lars-houtman

Sorry, but this is not a bug but a feature request. The Azure Function project is not a regular dotnet project. It needs to be run using Azure Function Core Tools. This is not yet supported by the plugin.

rafaelldi avatar Sep 06 '24 11:09 rafaelldi

Sorry, but this is not a bug but a feature request. The Azure Function project is not a regular dotnet project. It needs to be run using Azure Function Core Tools. This is not yet supported by the plugin.

Oh, apologies. I assumed the target was to work like in Visual Studio. I will rephrase my post.

lars-houtman avatar Sep 16 '24 13:09 lars-houtman

Hello there. I just want to get align and ask is there any roadmap about this feature ? When we can expect this azure functions support to be added ?

huberttrueselftrueme avatar Nov 14 '24 16:11 huberttrueselftrueme

Hello! Unfortunately, this is in our plans, but not soon. First, I plan to add support for more popular scenarios (running Functions in Docker container and with Docker Compose) and then implement this one.

rafaelldi avatar Nov 15 '24 08:11 rafaelldi

Not sure if this is already covered by questions above, but now with the preview of Aspire support for Azure Functions. Is this something that can be looked into? Running with dotnet CLI works fine, but starting up in Rider the Aspire dashboard says the function is running but it is not and has no processId connected.

Related issue on YouTrack: https://youtrack.jetbrains.com/issue/RIDER-118806/Add-support-for-Azure-Functions-in-Aspire-Host-via-Aspire-Plugin

Example appHost code:

var functions = builder.AddAzureFunctionsProject<Projects.functionProject>("functions")
    .WithExternalHttpEndpoints();

trulsmp avatar Dec 05 '24 07:12 trulsmp

Hello there !

What is a progress on this ? Will it be added soon ?

Hello! Unfortunately, this is in our plans, but not soon. First, I plan to add support for more popular scenarios (running Functions in Docker container and with Docker Compose) and then implement this one.

huberttrueselftrueme avatar Jan 22 '25 13:01 huberttrueselftrueme

Ah, I thought with the release of Aspire support, this would work out of the box. Too bad it does not 😓. Do you have a status update on this?

lars-houtman avatar Jan 22 '25 14:01 lars-houtman

Hello! Unfortunately, this is in our plans, but not soon. First, I plan to add support for more popular scenarios (running Functions in Docker container and with Docker Compose) and then implement this one.

Can we somewhere vote for this feature to be higher on the list?

glenndierckx avatar Jan 28 '25 09:01 glenndierckx

Hello, folks! We've released the initial support for the Azure Function projects. To try this out, you'll need our .NET Aspire plugin (version 1.7.3) and our Azure Toolkit for Rider plugin (version 4.4.3). Both are only supported with Rider 2025.1 EAP 3. Some issues still remain (like formatting console logs), and I plan to fix them soon. But you can already test it and leave feedback. Thanks!

rafaelldi avatar Feb 07 '25 14:02 rafaelldi