sdk icon indicating copy to clipboard operation
sdk copied to clipboard

How to deploy asp.net core 2.1 preview app to azure?? how do i install the new sdk in azure

Open DebolaA opened this issue 8 years ago • 4 comments

Steps to reproduce

i upgraded to .NET Core 2.1 Preview 1 SDK and i installed the asp.net core 2.1 preview site extension by following the instruction on the below link

https://blogs.msdn.microsoft.com/webdev/2018/02/27/asp-net-core-2-1-0-preview1-using-asp-net-core-previews-on-azure-app-service/

Expected behavior

expect the newly released sdk to be installed for azure web app

Actual behavior

running dotnet --info on the web app console screen gives the below result:

D:\home\site\wwwroot

dotnet --info D:\home\site\wwwroot .NET Command Line Tools (2.1.4)

Product Information: Version: 2.1.4 Commit SHA-1 hash: 5e8add2190

Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x86 Base Path: D:\Program Files (x86)\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host Version : 2.0.5 Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54

Environment data

dotnet --info output:

anyone knows how to deploy my asp.net core 2.1 preview app to azure?

DebolaA avatar Mar 08 '18 16:03 DebolaA

/cc @glennc

richlander avatar Mar 08 '18 16:03 richlander

@DebolaA Did stopping and starting the site again make a difference here? If that doesn't change anything then you can check the logs, Logs/SiteExtensions in the Kudu Console as well as the SiteExtensions directory that the extension gets installed into to see if it installed OK. I can find the exact paths you need if you need them.

glennc avatar Mar 08 '18 17:03 glennc

@glennc no, restarting the site did not make a difference. however, when i checked kudu; i realised the sdk 2.1 preview was installed to SiteExtensions/AspnetRuntime/sdk/

but from running the command dotnet --info; i realised the server is checking D:\Program Files (x86)\dotnet\sdk for the new install.

below is the error message i got when i deploy the web app to azure

D:\Program Files (x86)\dotnet\sdk\2.1.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets(135,5): error : The current .NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET SDK that supports .NET Core 2.1. [D:\home\site\repository\site.csproj]

how do i get the server to look in the right directory?

thank you

DebolaA avatar Mar 09 '18 09:03 DebolaA

@glennc i have gone to https://.scm.azurewebsites.net/SiteExtensions#gallery to ensure sdk was installed and restarted the site. i have been able to deploy to azure without error.

thank you.

DebolaA avatar Mar 09 '18 09:03 DebolaA