.Net Core 运行的时候报错

An assembly specified in the application dependencies manifest (xxx.deps.json) was not found:

package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1'

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.3.xml

是因为发布的包不能自包含

使用 dotnet publish 命令发布可以解决

命令

dotnet publish -c Release -r win-x64

此命令会产生一个exe文件..可以删除

 

转载于:https://www.cnblogs.com/iiwen/p/10774090.html

GitHub 加速计划 / de / Dependencies
8.61 K
704
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:3 个月前 )
1997a400 - 2 年前
2f423539 - 2 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐