Show pooled partial files

0

I'm creating a partial class, and I'd like to implement some validations in another partial class, just to separate the methods.

I know this is possible, but I would like to put these two sources together, is this possible?

For example:

Where is the source of RepositorioPais , I would like to create a RepositorioPais.Validacao class and append the two together, the same is done in forms created by C #. See picture 2.

Form

    
asked by anonymous 27.09.2017 / 19:56

1 answer

1

Only by manually editing the .csproj file.

If you are willing to do this, here are the steps.

  • Close the project in Visual Studio

  • Open the .csproj file with any text editor

  • Look for this (note that they will not necessarily be one below the other)

    <Compile Include="RepositorioPais.cs" />
    <Compile Include="RepositorioPais.Validacao.cs" />
    
  • Change these two items to

    <Compile Include="RepositorioPais.cs" />
    <Compile Include="RepositorioPais.Validacao.cs">
      <DependentUpon>RepositorioPais.cs</DependentUpon>
    </Compile>
    
  • Reopen the project

  • 27.09.2017 / 20:08