ASP.Net Core 部署后无法运行解决方案 An assembly specified in the application dependencies manifest (xxxxxx.json) was not found:

  • A+
所属分类:.NetCore Docker

ASP.Net Core 部署后无法运行解决方案  An assembly specified in the application dependencies manifest (xxxxxx.json) was not found:

错误信息:

  1. Error:  
  2.  An assembly specified in the application dependencies manifest (xxxxx.json) was not found:  
  3.  package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'  
  4.  path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'  
  5.  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:  
  6.  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  

解决方案:

  1. 添加如下代码后重新发布即可  
  2. <PropertyGroup>  
  3.  <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>   
  4. </PropertyGroup>  

或者直接安装Core运行时:

  1. sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm  
  2. sudo yum update   
  3. sudo yum install aspnetcore-runtime-2.1  
  1. 微软官方教程链接:  
  2. https://www.microsoft.com/net/download/linux-package-manager/centos/runtime-current  
钰玺

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: