I'm trying to deploy the contents of a dotnet project after running dotnet publish
, but the newer versions of azure-cli
complain with the following error message:
$ az webapp up --name MyAppService
Could not auto-detect the runtime stack of your app, see 'https://go.microsoft.com/fwlink/?linkid=2109470' for more information
Following the link, https://go.microsoft.com/fwlink/?linkid=2109470, I can see that it's looking for a *.csproj file, but that doesn't make sense to me, since I'm deploying files from my publish directory. From what I can see, if I run it from the directory that contains a *.csproj file it works, but tries to zip and upload all the source code and not just the published files.
It originally worked in azure-cli
v2.0.66. Recently I downgraded to v2.0.75 (as indicated here https://stackoverflow.com/a/59529584) and it works also, but I would like to keep azure-cli
up to date. I've also seen that the azure-cli
has added an --html
flag to deploy static files, but my situation is a bit different.
So the question is: How do I get az webapp up
to work from the dotnet publish
directory in versions of azure-cli
>v2.0.75?