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?
Update 12/4/2017
The ASP.NET Core runtime is now listed on the main downloads page for .NET Core. https://www.microsoft.com/net/download/linux
Update 10/3/2017
You can also install from a package feed.
See this link for instructions on adding the .NET Core package feeds for apt, yum, zypper, and others: https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download.md#installing-net-core-on-linux
For example, if you wanted to install on Ubuntu 16, you would do this:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt update
sudo apt install aspnetcore-store-2.0.0
Original answer
You can download just the ASP.NET Core runtime store from here:
https://dist.asp.net/runtimestore/2.0.0/linux-x64/aspnetcore.runtimestore.tar.gz
You'll also need to download the .NET Core 2.0.0 runtime (see https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download.md).
Extract both of these into the same folder, i.e. the "store" and "additionalDeps" folder from the runtime store archive should be parallel to the dotnet executable.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With