Hi Steve
The solution can be to add a node <DependentUpon> in the project file under the "Class1.cs" (where the partial class definition resides).
For example before the change the project.csproj looks like:
... ...
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="CodeFile1.cs"/>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
... ...
And after changes it's like:
... ...
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="CodeFile1.cs">
<DependentUpon>Class1.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
... ...
Then you will see that CodeFile1.cs is indented under the Class1.cs.
Before doing the changes, I'd recommend you to apply the small tip in the Visual Studio that can facilitate the job:
http://blogs.msdn.com/saraford/archive/2008/10/10/did-you-know-how-to-edit-a-csproj-or-vbproj-project-file-within-the-ide-332.aspx If there is anything unclear, please feel free to let me know.
Thanks.
Figo Fei
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.