您的位置:首页 > 其它

[VS] - "包含了重复的“Content”项。.NET SDK 默认情况下包括你项目中的“Content”项。

2018-01-12 15:56 387 查看
copy to :http://www.cnblogs.com/jinzesudawei/p/7376916.html

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>


参考资料
https://stackoverflow.com/a/45586177
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐