visual-studio-2008 - Visual Studio 2008 无法在解决方案资源管理器中正确嵌套文件

标签 visual-studio-2008

我有一个 VS 2008 WinForms 项目,我最近添加了一个在不同的 VS 2008 项目中开发的现有表单。所有原始表单和控件都正确嵌套,但是,对于新表单,它将表单、设计器和 resx 文件显示为 3 个单独的项目。

有没有办法强制 VS 正确嵌套这些文件?我浏览了设置、用谷歌搜索、访问了 MSDN,但似乎找不到这方面的信息。

最佳答案

假设新表单名为“Form1” 应该看起来像这样:

<Compile Include="Form1.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Form1.Designer.cs">
      <DependentUpon>Form1.cs</DependentUpon>
    </Compile>
    <EmbeddedResource Include="Form1.resx">
      <DependentUpon>Form1.cs</DependentUpon>
    </EmbeddedResource>

关于visual-studio-2008 - Visual Studio 2008 无法在解决方案资源管理器中正确嵌套文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3017052/

相关文章:

c# - 在 c# 中从 vs2008 迁移到 vs2012 的 Crystal 报表上未找到文件异常未处理

c# - 在代码 (.cs) 文件中插入图像

asp.net - 在 ASP.NET GridView 中显示选择性列

c# - 如何在文档注释中引用数组类型

asp.net-mvc - 使用 Visual Studio 调试,ASP.NET MVC 上的 URL 错误

c# - 在 Visual Studio Proff 中调试 native 代码

c - 是否可以在运行时找到结构变量和全局变量的 sizeof 和地址?

vb.net - 删除 VB.Net 中的 "Invisible"控制字符

用于调用 Web 服务的 Android 代码给出 "application stopped unexpectedly"错误

asp.net - 母版页怪异 - "Content controls have to be top-level controls in a content page or a nested master page that references a master page."