Oryx icon indicating copy to clipboard operation
Oryx copied to clipboard

Static Web Apps - Functions build - support extensions.csproj

Open anthonychu opened this issue 3 years ago • 2 comments

Feature Request

For non-.NET Azure Functions, an app can optionally install custom extensions. The way this works is the project includes an extensions.csproj file that contains references to extensions that should be installed.

When this file is detected in a function app, we need to run dotnet build extensions.csproj -o bin --no-incremental to restore extensions in bin/. Then run the normal build for the non-.NET language (Node.js or Python).

This does not apply to .NET.

Note: It's possible that this is already handled by app-type "functions". Currently, Static Web Apps does not call Oryx with an app type for the functions build.

anthonychu avatar Aug 24 '21 00:08 anthonychu

@anthonychu in addition to custom extensions restoration, there's also the problem that if your add an extensions.csproj file into a non .NET project within a SWA (JS for example), you'll always get an error that the runtime could not be detected, so the extensions.csproj file should be omitted when running the runtime detection. Not sure where the runtime detection occur though, so maybe it's a fix that belongs to another repo.

sinedied avatar Sep 29 '21 07:09 sinedied

It doesn't look like Oryx supports extensions.csproj even when deploying a function app outside of Static Web Apps. This might be difficult to support. Will need some investigation.

anthonychu avatar Oct 04 '21 06:10 anthonychu