tags:

views:

38

answers:

3

I have 2 files, 1 is form1.cs and the second is form1.resx. they should be linked but are not. how can I link the 2? if i just make sure the namespaces are the same will they automatically link to each other? do i need to clean the project?

A: 

Right-click both files and click Exclude from project.

Then, click Show all Files on top of the Solution Explorer, then right-click the .cs file and click Include in project.

SLaks
just the cs file?
mookie
I think so. Try it.
SLaks
A: 

Install VSCommand 2010.

Select two files then group two item from the context menu.

tonyjy
You can edit the .csproj file if you prefer: Unload your project by clicking Unload project from the context menu. Edit .csproj file by clicking Edit project from the context menu. Link the two files together using dependon. Load your project again.
tonyjy
A: 

You mean one as a subtree of the other? If what SLaks says doesn't work you can edit the proj file. I think it is like this, using the dependentupon xml

<Compile Include="FPtoICVService.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="FPtoICVService.Designer.cs">
      <DependentUpon>FPtoICVService.cs</DependentUpon>
    </Compile>
nportelli