- A+
错误信息:
- Error:
- An assembly specified in the application dependencies manifest (xxxxx.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.xml
解决方案:
- 添加如下代码后重新发布即可
- <PropertyGroup>
- <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
- </PropertyGroup>
或者直接安装Core运行时:
- sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
- sudo yum update
- sudo yum install aspnetcore-runtime-2.1
- 微软官方教程链接:
- https://www.microsoft.com/net/download/linux-package-manager/centos/runtime-current