dotnet core 2.1的asp.net core在docker下部署的時候發生下面的錯誤。
Error:
An assembly specified in the application dependencies manifest (MyApp.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
解決辦法是手動publish加上參數把'Microsoft.ApplicationInsights.AspNetCore這個包不要包含進去。docker
dotnet publish /property:PublishWithAspNetCoreTargetManifest=falsejson
搞不懂微軟,幹嗎默認集成這個包,這個包是用來搞智能監控的,貌似沒什麼用。關鍵是集成進去跟2.1的Runtime環境又不太同樣。哎。。。app