I created a Azure Web App to deploy a asp.net core 3.1 project on it. I have selected the 3.1 stack but when I SSH into the web app service and type dotnet --version, it shows 2.2 rather than 3.1 Why is that the case and how can I fix this?
Asked
Active
Viewed 36 times
1 Answers
0
It looks like you were running the command on the docker host instance and not the actual app service.
You can go to the General settingd of Configuration under Settings to check Stacking settings of your app.
You can run dotnet --list-runtimes
using the SSH tool under Development Tools in your Web App blade to view 3.1 running on your app.
See this document for more information.

Levi Lu-MSFT
- 27,483
- 2
- 31
- 43
-
But should the docker host instance also have 3.1? If so, why it's on 2.2? – M Yil Jul 21 '20 at 09:33
-
I checked and found that .NET Core 3.1 sdk folder exists under `opt/dotnet/sdks`. Probably it is not added to the PATH variable, so the the command doesnot work. – Levi Lu-MSFT Jul 21 '20 at 10:34