运行dotnet xxx.dll出现如下错误提示:
Error:
An assembly specified in the application dependencies manifest (RhWeb.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xm
参考连接:
https://github.com/dotnet/coreclr/issues/13542
依次尝试了上面链接的回答后发现,问题出在缺少 dotnet-hosting 上,或者实际上是处在aspnetcore-store 这个包没有安装的问题上,具体没有测试,但是执行安装dotnet-hosting 会自动安装aspnetcore-store的依赖包,之后就能正常运行dll了。