Vâng, nhưng đó là một chút rắc rối - về cơ bản bạn cần chỉnh sửa tệp dự án bằng tay.
Dưới đây là một ví dụ từ một dự án mà Marc Gravell và tôi đều làm việc trên:
<Compile Include="Linq\Extensions\DataProducerExt.cs" />
<Compile Include="Linq\Extensions\DataProducerExt.SingleReturn.cs">
<DependentUpon>DataProducerExt.cs</DependentUpon>
</Compile>
<Compile Include="Linq\Extensions\DataProducerExt.Grouping.cs">
<DependentUpon>DataProducerExt.cs</DependentUpon>
</Compile>
<Compile Include="Linq\Extensions\DataProducerExt.Pipeline.cs">
<DependentUpon>DataProducerExt.cs</DependentUpon>
</Compile>
<Compile Include="Linq\Extensions\DataProducerExt.Conversion.cs">
<DependentUpon>DataProducerExt.cs</DependentUpon>
</Compile>
<Compile Include="Linq\Extensions\DataProducerExt.Math.cs">
<DependentUpon>DataProducerExt.cs</DependentUpon>
</Compile>
Lưu ý "DependentUpon" phần tử trong mỗi phụ thuộc. Điều này hiển thị một cách thích hợp trong VS, với DataProducerExt.cs làm cha mẹ.
Nguồn
2008-10-21 19:56:21
Tiện ích FileNesting có thể tự động thực hiện điều đó: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.FileNesting – John