An assembly specified in the application dependencies manifest


.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文件..可以刪除

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM