[.Net Core] - Asp.Net Core 編譯成功,發佈失敗之解決

背景json

Asp.Net Core 項目編譯成功,發佈失敗。app

錯誤框架

Assets file 'D:\……\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v1.1'. Ensure that restore has run and that you have included 'netcoreapp1.1' in the TargetFrameworks for your project.spa

分析3d

該項目爲 .Net Core 2.0 框架,與發佈配置文件中版本號不一致。rest

解決xml

打開 ~\Properties\PublishProfiles\CustomProfile.pubxml,修正 TargetFramework 版本號便可。blog

相關文章
相關標籤/搜索