• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
博雅居
要想跟上时代,就得不断学习!
博客园    首页    新随笔    联系   管理    订阅  订阅
[VS] - "包含了重复的“Content”项。.NET SDK 默认情况下包括你项目中的“Content”项。" 之解决

背景

VS 2017 升级至  VS 2017 v15.3 后,.Net Core 1.1 应用编译报错:

Error: 包含了重复的“Content”项。.NET SDK 默认情况下包括你项目中的“Content”项。
可以从项目文件中删除这些项,或者如果希望将其显示包含在项目文件中,则可以将“EnableDefaultContentItems”属性设置为“false”。

Error : Duplicate ‘Content‘ items were included. The .NET SDK includes ‘Content‘ items from your project directory by default. 
You can either remove these items from your project file, or set the ‘EnableDefaultContentItems‘ property to ‘false‘ if you want to explicitly include them in your project file. 

解决

在 .csproj 项目文件中添加如下配置项,重启解决方案编译成功。

<PropertyGroup>
    <EnableDefaultContentItems>false</EnableDefaultContentItems>
  </PropertyGroup>

 

If opportunity doesn’t knock, build a door
posted on 2017-08-22 17:21  博雅居  阅读(798)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3