英文:
What is meaning of Folder tag in csproj
问题
在.NET C#项目中,使用遵循<Project Sdk="Microsoft.NET.Sdk">
模板的csproj
文件,我有一些类似下面的项目组:
<ItemGroup>
<Folder Include="Internal\" />
</ItemGroup>
我试图通过官方文档理解这个标签的含义,但我没有找到任何信息。
所以,我的问题是,这个标签是什么(它的含义是什么)?以及我何时将我的目录添加到csproj中作为Folder
标签?
我尝试在https://stackoverflow.com/a/71049728/1539100中进行搜索,但在Bing中没有找到有用的结果。
谢谢。
英文:
in .NET C# project, with csproj
file that follow <Project Sdk="Microsoft.NET.Sdk">
template, I have some item group like below
<ItemGroup>
<Folder Include="Internal\" />
</ItemGroup>
I try to understand what is meaning of this tag with official documents. But I do not find anything.
So, my question is, What is this tag (What is meaning of that?)? and When I add my directory in csproj as Folder
tag?
I try the search query in https://stackoverflow.com/a/71049728/1539100 but i do not find any useful result in Bing
thanks
答案1
得分: 3
这只是意味着,您在项目中创建了一个子文件夹。
查看解决方案资源管理器 - 您应该看到一个同名的文件夹。
英文:
This simply means, You have created a subfolder in your project.
Look in the Solution Explorer - You should see a folder with the same name.
答案2
得分: 0
这是您项目的虚拟结构,不反映磁盘上的结构。通常,它用于在Visual Studio中构建解决方案。
英文:
This is the virtual structure of your project and does not mirror the structure on disk. Usually, it is used for structuring solutions in VS.
答案3
得分: 0
根据您问题的描述,我认为您希望官方文档对此进行澄清,是吗?
如果是这样的话,MSBuild文档根本没有详细说明这个问题。也许微软认为这个元素可以字面理解,所以没有解释它,但您可以在其他地方看到这个元素的作用:
Folder元素(Visual Studio项目模板中的VS工具扩展性)
正如它所提到的,它指定了要添加到项目的文件夹。
实际效果是将文件夹及其内容添加到VS项目UI中:
顺便说一下,这个元素来自Microsoft.Build.Commontypes.xsd。
您无法找到文档的困惑完全是因为缺少文档,文档应该出现在这里:
Folder元素确实应该在上述文档中说明,您可以从xsd定义中理解这一点。
您可以在此处反馈文档的缺失:
英文:
From the description of your question, I think you want the official document to clarify this, right?
If so, The MSBuild documentation does not write this thing at all. Maybe Microsoft thinks this element can be understood literally, so it has not explained it, but you can see the role of this Element elsewhere:
Folder element (Visual Studio project templates) in VS Tools Extensionbility
As it mentioned, Specifies a folder that will be added to the project.
The actual effect is add folder and it's contents to VS project UI:
By the way, this element comes from Microsoft.Build.Commontypes.xsd.
The confusion you're experiencing with not being able to find documentation is entirely due to missing documentation, which should appear here:
Folder element should indeed be stated in the above document, you can understand this from the xsd definition.
You can feedback the document lack here:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论