[.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

相关文章
相关标签/搜索