Open Socolin opened 1 year ago
Same thing here. a found of issues here.
./bin/Debug/.net7.0/publish
. ./bin/xxxx/publish
folder as --api-location, the cloud resource can not detect the managed API correctly. After downgrade from 1.1.2 to version 1.1.1, it works perfect fine. what a day!
Hello,
After hours of trying to figure out thing I just want to request some improvement with the dotnet isolated integration, it was really painful to get it working, due to the lack of error message or misleading error message.
I was not using github, I'm just using the cli in bash console on Linux (I just wanted to figure things out before setting up pipeline in Azure DevOps)
Language is
dotnetisolated
and notdotnet-isolated
First things, the
--api-language
fordotnet-isolated
function is...dotnetisolated
(no dash) I spent so much time on it, getting the error message:I added to the
staticwebapp.config.json
the following, but it did not help (but the error message say it should...)Then I tried adding the
--api-version 7.0 --api-language dotnet-isolated
parameters and I was still getting the error message, I had to check the code to find this came fromStaticSitesClient
open this as text and find the json in it to finally see the string for the language isdotnetisolated
and notdotnet-isolated
And if I try to put
dotnetisolated:7.0
in the config file I'm getting this errorSo there is no easy way to figure out that the language should be
dotnetisolated
I think this may be a bug, but a tlease it would be nice in the error message to list the valid languages/versions.swa build
/swa deploy
was not publishing the api and is not deploying the correct folderswa build
was not building the dotnet app because there was noiapiBuildCommand
in theswa-cli.config.json
one improvement could be to add warning when there is an api location /platform.apiRuntime
configured with no build command (at least for dotnet)And when using the
swa deploy
I had to target the output folder in the--api-location
instead of./api
I has to add./api/publish
(I'm using the build commanddotnet publish -c Release -o publish
)That's all, I hope this can help to improve this product :) or at least it might help someone else trying to figure it out too in the future.