Error:
  An assembly specified in the application dependencies manifest (*.*.deps.json) was not found:
    package: ‘Microsoft.AspNetCore.Antiforgery‘, version: ‘2.0.3‘
    path: ‘lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.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.8.xml 

  原因:asp.net 没有把服务器需要的包全部发布出来,它认为是目标系统带着有,而实际上目标系统中没有。
  解决办法:增加如下一行到csjproj文件中即可

<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>

 

<PropertyGroup>
  <TargetFramework>netcoreapp2.0</TargetFramework>
  <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

  






相关文章:

  • 2021-06-11
  • 2021-11-05
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2021-07-17
  • 2021-11-13
  • 2021-05-25
猜你喜欢
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案