仅在具有.NET Core 2.0运行时的Linux上缺少运行时存储错误 [英] missing runtime store error on linux with .NET Core 2.0 runtime only

查看:130
本文介绍了仅在具有.NET Core 2.0运行时的Linux上缺少运行时存储错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将某些应用程序从.NET Core 1.1更新到2.0.这些应用程序在本地可以正常运行,但是在我的Linux VM上更新了运行时并进行部署后,出现了错误:

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:

在应用程序依赖清单中指定的程序集 找不到(foo.deps.json): 软件包:'Microsoft.ApplicationInsights.AspNetCore',版本:'2.1.1' 路径:'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
预期该程序集将作为本地程序集存储在本地运行时存储区中. 应用程序是使用以下目标清单文件发布的: 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

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

我认为这是因为使用Microsoft.AspNetCore.All程序包时,运行时下载不会生成所需的新运行时存储文件夹.

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.

我可以改为安装整个SDK,这可以正常工作,但我希望仅继续使用运行时.

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

如何在生产服务器上不需要SDK的情况下手动生成运行时缓存?

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

推荐答案

更新12/4/2017

ASP.NET Core运行时现在列在.NET Core的主要下载页面上. https://www.microsoft.com/net/download/linux

The ASP.NET Core runtime is now listed on the main downloads page for .NET Core. https://www.microsoft.com/net/download/linux

更新10/3/2017

您也可以从软件包供稿中安装.

You can also install from a package feed.

有关添加适用于apt,yum,zypper等的.NET Core包供稿的说明,请参见此链接:

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

例如,如果要在Ubuntu 16上安装,请执行以下操作:

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

原始答案

您可以从此处仅下载ASP.NET Core运行时存储区:

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

您还需要下载.NET Core 2.0.0运行时(请参阅

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).

将这两个文件都提取到同一文件夹中,即运行时存储档案中的"store"和"additionalDeps"文件夹应与dotnet可执行文件平行.

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.

这篇关于仅在具有.NET Core 2.0运行时的Linux上缺少运行时存储错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆