Visual Studio 2008 Incorrectly Attached Files in Solution Explorer

I have a VS 2008 WinForms project, and I recently added an existing form that was developed in another VS 2008 project. All the original forms and controls are correctly entered, but with the new form they display the form, designer and resx files as 3 separate elements.

Is there a way to get VS to properly attach these files? I went through the settings, entered Google, was on MSDN and could not find information about it.

+3
source share
2 answers

Assuming the new form is called Form1, it should look like this:

<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>
+2
source

.csproj, , . <DependentUpon> .

+1

Source: https://habr.com/ru/post/1749453/


All Articles