Azure / Azure/static-web-apps

Support for `dotnet-isolated` version 8.0 for managed APIs

Open
#1,394 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Dotnet 8.0 is now out for around 2 months, so it would be nice to have the support also in azure static web apps.
Currently when you try to deploy an dotnet 8.0 functions project to azure static webapp you will get with the swa cli the following response:

```bash
PS /workspaces/CZ.Azure.FileExchange> swa deploy ./temp/fe/wwwroot/ --deployment-token $token --api-location ./temp/api/

Welcome to Azure Static Web Apps CLI (1.1.6)

Deploying front-end files from folder:
/workspaces/CZ.Azure.FileExchange/temp/fe/wwwroot

Deploying API from folder:
/workspaces/CZ.Azure.FileExchange/temp/api

Consider providing api-language and version using --api-language and --api-version flags,
otherwise default values apiLanguage: node and apiVersion: 16 will apply

Deploying to environment: preview

WARNING: Failed to read staticwebapp.config.json configuration from:
/workspaces/CZ.Azure.FileExchange/temp/fe/wwwroot/staticwebapp.config.json

The following error was encountered: must be equal to one of the allowed values dotnet:3.1, dotnet:6.0, dotnet-isolated:6.0, dotnet-isolated:7.0, node:12, node:14, node:16, node:18, python:3.8, python:3.9, python:3.10
0: {
1: "platform": {
2: "apiRuntime": "dotnet-isolated:8.0"
3: },

Please fix the above error and try again to load and use the configuration.
Read more: https://aka.ms/swa/config-schema
Deploying project to Azure Static Web Apps...
Could not find StaticSitesClient local binary
[swa] ✔ Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.025241/linux/StaticSitesClient@1.0.025241
⠋ Preparing deployment. Please wait...✖
✖ Deployment Failed :(
✖ Deployment Failure Reason: spawn ETXTBSY
✖ For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/azure/static-web-apps/

✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
https://github.com/Azure/static-web-apps-cli/issues/new/choose
```

When you try it manually (so directly talk to the SWA apis, that I refactored) you get no errors but the following result:
image

> This is the behavior if Azure static webapps has a problem to start the functions API

**Describe the solution you'd like**
I know that there will be some time to go to get in-process support for dotnet 8.0. But it would be nice to have already access to it for `isolated` installations.

What was confusing is that there is a blog post out, that claims that it should work to deploy a dotnet 8.0 isolated SWA functions API:
https://techcommunity.microsoft.com/t5/apps-on-azure-blog/build-and-deploy-net-8-blazor-wasm-apps-with-serverless-apis/ba-p/3988412

A sample project to try things out can be found here:
https://github.com/codez-one/CZ.Azure.FileExchange/pull/39

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.