missing runtime store error on linux with .NET Core 2.0 runtime only

Viewed 3442

I am updating some applications from .NET Core 1.1 to 2.0. The apps work fine locally but after updating the Runtime on my linux VM and deploying, I am getting errors:

An assembly specified in the application dependencies manifest (foo.deps.json) was not found: package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1' path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml

I think this is because the Runtime download does not generate the new runtime store folder needed when you use the Microsoft.AspNetCore.All package.

I can install the whole SDK instead and this works fine but I would prefer to continue to use the runtime only.

How do I generate the runtime cache manually without requiring the SDK on the production server?

5 Answers

Per the Runtime package store documentation, you can add the following to your .csproj file:

<PropertyGroup>
  <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

and the dependencies will be included when you use dotnet publish.

At runtime machine

sudo yum install aspnetcore-store-2.0.7

NOTE! Install your version instead of "2.0.7" For me it works.

Related