We use allot of partial classes in C# to categorise our code for large classes. In the solution explorer we will have code files listed as such:
- MyClass.cs
- MyClass.Partial1.cs
- MyClass.Partial2.cs
But what we want to have is something like this (as you would see with designer files etc.):
- MyClass.cs
˪ MyClass.Partial1.cs
˪ MyClass.Partial2.cs
I'm aware that you can modify the project file manually to set-up this dependency like this:
<Compile Include="MyClass.cs" />
<Compile Include="MyClass.Partial1.cs">
<DependentUpon>MyClass.cs</DependentUpon>
</Compile>
<Compile Include="MyClass.Partial2.cs">
<DependentUpon>MyClass.cs</DependentUpon>
</Compile>
Is there a short-cut in visual studio? Or maybe an extension that will help with this? (Without needing to edit the project file manually)