Include Content in csproj with a wildcard

Viewed 5001

First the problem I'm trying to solve. I work on a large team and we are constantly having merge conflicts on our web.csproj file. The solution I was trying to implement was including content files using a wild card.

I'm trying to include all files in a directory in my web.csproj file like so.

<Content Include="Areas\Public\Client\**\*.js" />
<Content Include="Areas\Public\Client\**\*.html" />
<Content Include="Areas\Public\Client\**\*css" />

This works great at first glance. I can see all files matching these patterns in visual studio. The problem is, if someone deletes a files from Visual Studio, the IDE then enumerates ALL files in the csproj file and removes my wildcard lines above.

Have any of you solved this problem or have any suggestions?

Thanks!

1 Answers
Related