Visual Studio 2008 未在解决方案资源管理器中正确嵌套文件 [英] Visual Studio 2008 not nesting files properly in solution explorer
问题描述
我有一个 VS 2008 WinForms 项目,我最近添加了一个在不同 VS 2008 项目中开发的现有表单.所有原始表单和控件都正确嵌套,但是,在新表单中,它将表单、设计器和 resx 文件显示为 3 个单独的项目.
I have a VS 2008 WinForms project, and I recently added an existing form that was developed in a different VS 2008 project. All of the original forms and controls are nesting correctly, however, with the new form, it is showing the form, designer and resx files as 3 separate items.
有没有办法强制 VS 正确嵌套这些文件?我已经通过设置,谷歌搜索,到 MSDN,但似乎无法找到这方面的信息.
Is there a way to force VS to nest these files properly? I've been through the settings, googled, been to MSDN, and can't seem to find information on this.
推荐答案
假设新表单名为Form1"应该是这样的:
Assuming the new form is called "Form1" should look like this for it:
<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 未在解决方案资源管理器中正确嵌套文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!