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
2010-10-15 15:57:34
just the cs file?
mookie
2010-10-15 16:05:05
I think so. Try it.
SLaks
2010-10-15 16:10:48
A:
Install VSCommand 2010.
Select two files then group two item from the context menu.
tonyjy
2010-10-15 16:03:59
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
2010-10-15 16:04:32
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
2010-10-15 16:04:30