How to nest xaml.cs under xaml files when using wildcards in csproj

Viewed 909

I have a question regarding the csproj file.

As I have a big source base that is generated, I am trying to minimize collisions on the project file (when developing with a team).

I managed to get rid of most collisions by using tags like this:

<Compile Include="Services\**\*.cs" /> 

for normal cs files and

<Page Include="Entities\**\*.xaml">
  <SubType>Designer</SubType>
  <Generator>MSBuild:Compile</Generator>
</Page>

for xaml and codebehind.

Unfortunately, I loose the grouping of .xaml and .xaml.cs pairs, which is bearable but clumsy.

Is there any way to create a generic pattern for these?

<Compile Include="MainWindow.xaml.cs">
  <DependentUpon>MainWindow.xaml</DependentUpon>
  <SubType>Code</SubType>
</Compile>

I know about the possibility to split the csproj itself but this would forbid solution wide searches so this is a no-go

2 Answers
Related