.Net Core 发布异常 An assembly specified in the application

在Core 2.0站点发布时..

DotNet WW.kkkk.dll

报错..报文内容如下:

Error:
 An assembly specified in the application dependencies manifest (ZKEACMS.WebHost.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.xml

查询后在以下链接中找到解决办法

https://www.cnblogs.com/seriawei/p/8746249.html

复制:

这是因为只安装了.Net Core运行时,而没有安装ASP.NET Core运行时

当然,你也可以在发布的时候带上它:

<PropertyGroup>
 <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> 
</PropertyGroup>

该配置加入到项目的配置XML中.

位置在.. 

在文件中加入该节点..然后重新发布.. 

猜你喜欢

转载自www.cnblogs.com/iiwen/p/9111791.html