【问题标题】:assembly specified in the dependencies manifest was not found 'Microsoft.ApplicationInsights.AspNetCore'未找到依赖项清单中指定的程序集“Microsoft.ApplicationInsights.AspNetCore”
【发布时间】:2017-09-24 18:14:59
【问题描述】:

我想在 windows 10 中为 ubuntu16.04 发布 .net core 2.0 项目:

dotnet 构建
dotnet publish -c Release -r ubuntu.16.04-x64

在构建和发布项目并在 ubuntu 上运行它之后,我看到了这个错误:

错误:未找到依赖项清单中指定的程序集 'Microsoft.ApplicationInsights.AspNetCore',版本:'x.x',路径: ‘lib/netstandard1.3/Microsoft.ApplicationInsights.AspNetCore.dll’

我也测试了这个解决方案:

<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>

但没有解决:(

虽然我在 .net core 1 中没有这个问题

【问题讨论】:

  • 您是否尝试过运行dotnet restore 以便下载NuGet 依赖项?
  • 是的,我试过了,但我得到了同样的错误......这个文件(Microsoft.ApplicationInsights.AspNetCore.dll)存在于发布文件夹中,但我在ubuntu16.04中有错误......
  • 这里有同样的问题。你解决了这个问题吗?

标签: c# .net ubuntu-16.04 asp.net-core-2.0


【解决方案1】:

您是否在仅安装了 .netcore 运行时的机器上运行它?

在这种情况下,您需要安装 aspnetcore 运行时存储。它包含在 dotnet sdk 中,但不包含在默认运行时中。

根据您安装运行时的方式,您必须通过包管理器 (apt-get install aspnetcore-store-2.0.0) 安装它,或者下载 tarball 并将其安装在您的 dotnet 文件夹中,如下面的链接所述:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-10-25
    • 2019-10-14
    • 2018-07-31
    • 2018-01-04
    • 2020-02-01
    • 1970-01-01
    • 2020-01-10
    • 1970-01-01
    相关资源
    最近更新 更多