ASP.NET Core网站报“An assembly specified in the application dependencies manifest was not found”异常解决
ASP.NET Core网站报“An assembly specified in the application dependencies manifest was not found”异常,是因为服务端只安装了ASP.NET Core Runtime,而未安装ASP.NET Core SDK,解决方法是安装SDK或者在主项目的.csproj项目文件中加上如下配置并重新发布:
<PropertyGroup> <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> </PropertyGroup>
该配置表示发布时去掉ASP.NET Core Manifest JSON文件,这样运行时就不再根据清单文件查找依赖项了。