2017-09-24 69 views
1

我要发布的.NET 2.0的核心项目在Windows 10 ubuntu16.04:未找到“Microsoft.ApplicationInsights.AspNetCore”

dotnet build
dotnet publish -c Release -r ubuntu.16.04-x64

构建和pulish项目并运行后,它在Ubuntu中,我看到这个错误:

Error: assembly specified in the dependencies manifest was not found ‘Microsoft.ApplicationInsights.AspNetCore’, version: 'x.x', path: ‘lib/netstandard1.3/Microsoft.ApplicationInsights.AspNetCore.dll’

我还测试了这款解决方案:

<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> 

但没有解决:(

虽然我没有在.NET的核心这个问题1

+0

您是否尝试过运行'dotnet restore'以便下载'NuGet'依赖项? –

+0

是的,我尝试了,但我得到了同样的错误... 此文件(Microsoft.ApplicationInsights.AspNetCore.dll)存在于发布文件夹中,但我在ubuntu16.04中有错误... –

回答

0

你上安装只.netcore运行其中有一个mahine运行呢?

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

取决于你如何安装运行时,你将不得不通过包管理器(apt-get install aspnetcore-store-2.0.0)或下载压缩包进行安装,并在您的dotnet的文件夹中安装它下面的链接表示在:

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