Skip to content

Azure App Service fails to load .net Core application after upgrade to 2.1.4 #3531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ld0614 opened this issue Sep 12, 2018 · 9 comments
Closed

Comments

@ld0614
Copy link

ld0614 commented Sep 12, 2018

After upgrading the .net Core nuget packages last night from 2.1.3 to 2.1.4 to mitigate the published security issues, I attempted to push these to an Azure App Service.

However I get the following error:
image

dotnet --info of Azure App Service

dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.401
 Commit:    91b1c13032

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.401\

Host (useful for support):
  Version: 2.1.3
  Commit:  124038c13e

.NET Core SDKs installed:
  1.1.8 [D:\Program Files (x86)\dotnet\sdk]
  1.1.10 [D:\Program Files (x86)\dotnet\sdk]
  2.1.101 [D:\Program Files (x86)\dotnet\sdk]
  2.1.301 [D:\Program Files (x86)\dotnet\sdk]
  2.1.401 [D:\Program Files (x86)\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.1 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.1 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.3 [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.10 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.12 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.7 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.9 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.6 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.1 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

dotnet --info of development machine (where it works)

dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.402
 Commit:    3599f217f4

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.402\

Host (useful for support):
  Version: 2.1.4
  Commit:  85255dde3e

.NET Core SDKs installed:
  1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk]
  1.0.4 [C:\Program Files\dotnet\sdk]
  1.1.0 [C:\Program Files\dotnet\sdk]
  2.1.4 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.302 [C:\Program Files\dotnet\sdk]
  2.1.400 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]
  2.1.402 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3-servicing-26724-03 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

The packaged deployed is using the standard Azure DevOps (VSTS) Build and publish tasks. My guess is that Azure App Service requires the latest patches to support the updated nuget packages, is this correct?

Is it possible to use a dedicated version of .net core on an Azure app service by using portable binary compliation?

Is there a clear guide on application lifecycles in respect to .net core packages and versions? I've had a look but wasn't able to find anything describing when nuget packages should be updated vs the runtime they run on etc.

@Eilon
Copy link
Contributor

Eilon commented Sep 12, 2018

Hi @ld0614 , what does your app's CSPROJ look like? I think in general you don't need to reference 2.1.4 explicitly. You would only reference that if you have a specific need for 2.1.4, such as requiring a bug fix. I'm guessing Azure App Services doesn't have 2.1.4 yet (but I think it will soon).

In general we recommend that apps require 2.1, but not specific patch versions, so it will run on any 2.1.x instance.

@davidebbo
Copy link

I'm guessing Azure App Services doesn't have 2.1.4 yet (but I think it will soon).

Yes, should be done by tomorrow. But regardless, targeting 2.1 without a specific patch version is the way to go.

@ld0614
Copy link
Author

ld0614 commented Sep 12, 2018

Thanks for the info, the relevant parts of the csproj are:

<TargetFramework>netcoreapp2.1</TargetFramework>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.4" />

I haven't manually been modifying this file, just upgrading the packages through NuGet in Visual Studio as they become available, after an upgrade, should I be remodifying the package reference back to 2.1?

@Tratcher
Copy link
Member

Set it to <PackageReference Include="Microsoft.AspNetCore.App" />. Does the package manager offer you an upgrade after that?

@Tratcher
Copy link
Member

Yeah, it won't offer you upgrades if you remove the version. The runtime will roll forward automatically.
image

@moshegutman
Copy link

I wish VS would display information about the "roll-forward" feature.

@MisterJimson
Copy link

Relevant #3292

@davidebbo
Copy link

FWIW, the 2.1.4 release to App Service is now complete.

@ld0614
Copy link
Author

ld0614 commented Sep 13, 2018

Thanks for the update @davidebbo. I'll close the issue as that (and the implicit versioning) has solved my issue. My suggestion to avoid similar things happening to people like me would be to update the description text of the NuGet package just to mention that the runtime must match or exceed the nuget version:
image

Thanks

@ld0614 ld0614 closed this as completed Sep 13, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants