错误netsdk1022:重复' content'包括项目。 .NET SDK包括' content'默认情况下,项目目录中的项目
我遇到此错误:
错误netsdk1022:包括重复的“内容”项目。默认情况下,.NET SDK从您的项目目录中包含“内容”项目。您可以从项目文件中删除这些项目,也可以将“启用FefaultContentItems”属性设置为“ false”,如果您要明确将它们包含在项目文件中。有关更多信息,请参见 https://aka.ms/sdkimpliticitems 。重复的项目为:'c:\ users ...... \ microsoft.cloud.instrumentationframework.vc14 \ 3.1.6.86 \ build \ build \ natival \ lib \ lib \ concrt140.dll';
建立成功,但是在最终工件中丢失了许多重要的项目文件。
(编辑:重要的文件包括具有SDK二进制文件的XARM,X64,X86文件夹。)
我在与此相关的Internet上引用了多个文章,但是所有这些都面临着与WWWRoot文件夹有关的问题。
例如:被包括在内。 .NET SDK默认情况下,来自项目目录中的“内容”项目
我面临的问题是Microsoft SDK库文件。 任何帮助将不胜感激。
I am running into this error:
Error NETSDK1022: 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. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'C:\Users......\microsoft.cloud.instrumentationframework.vc14\3.1.6.86\build\native\lib\concrt140.dll';
Adding the EnableDefaultContentItems tag makes the build successful, but many of the important project files go missing in the final artifact.
(Edit: The important files include the xARM, x64, x86 folders which have the sdk binaries.)
I have referred multiple articles on internet related to this, but all of those were facing issues related to wwwroot folder.
For example: Duplicate 'Content' items were included. The .NET SDK includes 'Content' items from your project directory by default
Issue I am facing is with the microsoft sdk library files.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请查找以下步骤是否有助于解决问题:
在项目的根文件夹中添加
directory.build.props
,以设置< enabledEffaultCompileItems> enabledEff; enabledEff; enabledefeft; enabledefeft; >可能是一次为所有项目解决此问题的最简单方法。
请参阅此
Please find if the below steps help to resolve the issue:
Adding a
directory.build.props
in the root folder of your project to set the<EnableDefaultCompileItems>false<EnableDefaultCompileItems>
is probably the simplest method to fix this for all projects at once.Please refer this troubleshooting doc for more information: