Visual Studio F#项目:文件树中不能有两个具有相同名称的文件夹吗? [英] Visual Studio F# project: Can't have two folders in a file tree with the same name?
问题描述
在Visual Studio 2013中,我的一个项目包括:
In Visual Studio 2013, one of my projects includes:
<ItemGroup>
<Compile Include="Entity\Abstract\Entity.fs" />
<Compile Include="Entity\HumanEntity.fs" />
<Compile Include="State\Abstract\State.fs" />
<Compile Include="State\Abstract\HumanState.fs" />
<Compile Include="State\Human\HumanIdleState.fs" />
<Compile Include="State\Human\HumanAwakenState.fs" />
</ItemGroup>
Visual Studio对此感到窒息,声称:
Visual Studio chokes on this, claiming that:
The project 'Entity.fsproj' could not be opened because opening it would cause a folder to be rendered multiple times in the solution explorer. One such problematic item is 'State\Abstract\State.fs'.
如果我这样更改include,一切都很好:
If I change the includes like so, everything is fine:
<ItemGroup>
<Compile Include="Entity\AbstractEntity\Entity.fs" />
<Compile Include="Entity\HumanEntity.fs" />
<Compile Include="State\AbstractState\State.fs" />
<Compile Include="State\AbstractState\HumanState.fs" />
<Compile Include="State\Human\HumanIdleState.fs" />
<Compile Include="State\Human\HumanAwakenState.fs" />
</ItemGroup>
这是VS2013的疏忽吗,还是我在做错什么?
Is this an oversight in VS2013, or am I doing something wrong, here?
推荐答案
不幸的是,这是Visual Studio中F#项目系统的局限.可以在本文.
Unfortunately it's a limitation of F# project system in Visual Studio. A more detailed analysis could be found in this article.
在 Visual F#电动工具,我们必须添加验证以防止用户使用菜单项在项目中添加名称重复的文件夹(请参见相关讨论).当然,我们不能通过编辑fsproj
文件来阻止用户这样做.
In the upcoming support for folder organization in Visual F# Power Tools, we have to add validation to prevent users from adding folders with duplicated name in a project using menu items (see the code and relevant discussion). Certainly we can't prevent users doing so by editing fsproj
files.
也许您可以在Microsoft dot com上向fsbugs发送建议,以便可以在即将发布的Visual F#Tools版本中对其进行修复.
Perhaps you can send a suggestion to fsbugs at microsoft dot com, so that it could be fixed in an upcoming version of Visual F# Tools.
这篇关于Visual Studio F#项目:文件树中不能有两个具有相同名称的文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!