【问题标题】:“There are no property pages for the selection” error in Visual Studio, on one project onlyVisual Studio 中的“没有用于选择的属性页”错误,仅在一个项目中
【发布时间】:2019-01-04 19:13:51
【问题描述】:

ThereareexistingStackOverflow 上已经有“There are no property pages for the selection”问题,但我遇到了一个新版本。

在我的例子中,在 Git 合并后,14 个项目中只有一个出现“没有可供选择的属性页”错误。关联的 .vcproj 文件没有显示明显的错误。

【问题讨论】:

    标签: git visual-studio vcproj


    【解决方案1】:

    .vcproj 旁边是一个附加文件 .vcproj.filters。这控制解决方案资源管理器的布局。它的结构是这样的:

    <ClCompile Include="A.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="B.cpp">
      <Filter>Source Files</Filter>
    </ClCompile>
    

    这里的问题是,如果两个 Git 提交每个都添加这些文件之一。 Git Merge 不理解 XML,并将合并(相同的)关闭标签。这会留下两个&lt;ClCompile&gt; 标签和一个&lt;/ClCompile&gt;

    解决方法是卸载项目Open With&gt;XML editor .filters 文件,并找到丢失的&lt;/ClCompile&gt;

    附言向 Microsoft 提出功能请求

    详细一点,使用&lt;ClCompile Include="B.cpp" Filter="Source Files" /&gt;。属性不应该是子属性,Filter 的限定域明确表明这是一个属性。作为单线,这是合并安全的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-11
      • 2014-12-05
      • 2018-04-02
      • 1970-01-01
      • 2016-08-01
      • 2019-02-09
      • 1970-01-01
      • 2020-12-13
      相关资源
      最近更新 更多