試圖從碼頭工人形象運行我的應用程序時,我收到以下錯誤:在找不到搬運工圖像應用洞察依賴DOTNET後發佈
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.ApplicationInsights.AspNetCore', version: '1.0.2', path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
泊塢窗圖像是基於microsoft/aspnetcore
。
使用dotnet restore
和dotnet publish
泊塢窗圖像上microsoft/aspnetcore-build:1.1.0-projectjson
在{app}.deps.json
,其中建在"targets"
的文件,我有:
"Microsoft.ApplicationInsights.AspNetCore/1.0.2": {
"dependencies": {
"Microsoft.ApplicationInsights": "2.1.0",
"Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
"Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
"Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.1",
"Microsoft.Extensions.Configuration": "1.0.0",
"Microsoft.Extensions.DiagnosticAdapter": "1.0.0",
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"System.Net.NameResolution": "4.3.0"
},
"runtime": {
"lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll": {}
},
"compile": {
"lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll": {}
}
},
我沒有lib
文件夾在我發表的輸出,但我有Microsoft.ApplicationInsights.AspNetCore
位於我發佈的輸出的根目錄。
我覺得我失去了一些明顯的東西。任何幫助,將不勝感激。
更新:
更新應用洞察2.0.0沒有影響。
刪除Application Insights將問題簡單地移到另一個程序集。
切換到獨立部署不起作用。
新增COREHOST_TRACE=1
並取得了以下的輸出:
Processing TPA for deps entry [Microsoft.ApplicationInsights.AspNetCore, 2.0.0, lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll]
Considering entry [Microsoft.ApplicationInsights.AspNetCore/2.0.0/lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll] and probe dir [/packagescache/x64]
The hash file is invalid [/packagescache/x64/Microsoft.ApplicationInsights.AspNetCore/2.0.0/Microsoft.ApplicationInsights.AspNetCore.2.0.0.nupkg.sha512]
Skipping... match hash failed
Considering entry [Microsoft.ApplicationInsights.AspNetCore/2.0.0/lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll] and probe dir [/packagescache]
The hash file is invalid [/packagescache/Microsoft.ApplicationInsights.AspNetCore/2.0.0/Microsoft.ApplicationInsights.AspNetCore.2.0.0.nupkg.sha512]
Skipping... match hash failed
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.0.0', path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
可能相關嗎?你是如何發佈的? http://stackoverflow.com/questions/38796439/how-to-include-dependencies-in-net-core-app-docker-image?rq=1 –
你找到了答案嗎? – bdparrish