VS IDE should support file patterns in project files
Patterns should be preserved and unmodified when working with *proj files. If I specify a pattern with something like **/*.cs for my code files. If I add a new .cs file that fits that pattern the .csproj file should not be modified.
MSBuild already respects this, but the IDE will always modify the project file.
For numerous scenarios this could simplify the diff / merge process.
I'd like solution explorer to be a view on the file system. By doing this project files would be incredibly merge friendly, because they would only be updated for metadata (prefer many files to one file with many sections in that case too) or exclusions. This might open the door for more convention based project configuration/structure than even today.
Andy Yong commented
They will have to figure out a way to exclude file from project...
Robert Petz commented
@JohnStaelens absolutely! web development roundtripping between sublime and VS is such a pain because of this
John Staelens commented
Rahul Mittal commented
Would also like to add that if I have a **/*.cs and **/*.aspx.cs rule in my project file, the latter gets ignored. Can we ensure the latter overrides the former regardless of whether the latter is defined before or after the former?
Gordon Tucker commented
How is this not in VS yet? This would make nearly all our merge conflicts go away
I just lost a whole week merging, and around 30% of the time was csproj files. And it's not even the first time.
MS, please please please implement this.
Hi, 3-voted this one: here is the particular scenario I setup and which would benefit from this:
I'm part of a team building a rather large application split into a .NET client and a Java server. Both parts communicate through Soap + Google Protobuf. Tjherefore the wsdl/proto contracts are shared between the 2 technologies.
On the .NET side I have set up a generation chain that takes wsdl, protobuf (as well as other input data) and generates proxies in cs files. Because I don't want to modify the corresponding csproj each time I gen my source cs, I use the *.cs trick. Everything works well except when somebody changes the project from Visual Studio... And this happens once in a while... It's be much more secure if the csproj could remember it should include files based on a wildcard.
Guido Smeets commented
sounds like a plan. while at it though, maybe also make them sort items in some way, that would solve 80% of the merge issues as well.
This will also help with the nasty problem of csproj merge conflicts because of high churn.
Think of this like .ignore files for Visual Studio rather than .includes. You add more often than you ignore.