2017-09-24 72 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