I suggest you ...

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.

3,110 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Corey KaylorCorey Kaylor shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    cromwellryancromwellryan shared a merged idea: Make project files exclusionary vs inclusionary  ·   · 

    17 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Vadivel KumarVadivel Kumar commented  ·   ·  Flag as inappropriate

        This is definitely needed feature for a big, geographically divided team. I already see Java world solves this (live maven, graddle etc.,) problem.

      • Michael PatersonMichael Paterson commented  ·   ·  Flag as inappropriate

        @Nathan Black that's an amazing idea! We are building an angularjs app that has _nothing_ to do with asp.net. That being said, I love Visual Studio and want to continue using it as my daily development but I don't want to dictate to others which OS/IDE (if any) they should use. I'm considering treating the project as a web site instead of a web application which I think might solve the problem in a round-about way.

      • Wes DayWes Day commented  ·   ·  Flag as inappropriate

        This leads to a place where solution and project files are mostly empty.
        The next step is to move to conventions based approach for solutions and projects, so that in the default case no solution or project files are even necessary.
        They would only be necessary for cases in which you wish to override the default conventions.

      • Nathan BlackNathan Black commented  ·   ·  Flag as inappropriate

        @micheal patternson I'm that Sublime Text guy :) I wildcard it and it works until the VS guys add a file and VS just expands them all again.

        What's sad is I first recognized this as a problem in 2006. The fact it is still an issue in 2014 shows that Dev Div is far disconnected from us developers. Oh well back to Sublime...

      • EwenEwen commented  ·   ·  Flag as inappropriate

        For a lot of build configs etc I import a .csproj file - Visual Studio tends not to ****** those.

        <Import Project="blah\blah\blah.csproj"> It also keeps Absolute file paths intact.

      • Michael PatersonMichael Paterson commented  ·   ·  Flag as inappropriate

        This would really be great for teams that develop on different platforms for the same project. I love Visual Studio on Windows and others on my team use Sublime Text on a Mac. This would definitely make it a much better experience.

      • Philipp KursawePhilipp Kursawe commented  ·   ·  Flag as inappropriate

        That is really anyoing and I have to wonder how the teams of MSFT handle projects with a lot of files without the wildcard msbuild feature.

      • Anonymous commented  ·   ·  Flag as inappropriate

        @JohnStaelens absolutely! web development roundtripping between sublime and VS is such a pain because of this

      • John StaelensJohn Staelens commented  ·   ·  Flag as inappropriate

        Also, make it so that VS will watch the directories under a /**/ pattern. We have a team that does most of their work in Sublime Text but it would be nice for people who work in both .Net and JavaScript to be able to see any new files when added to a specific directory structure (when we get latest) without having to unload and load the project.

      • Rahul MittalRahul Mittal commented  ·   ·  Flag as inappropriate

        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?

      • dandrakadandraka commented  ·   ·  Flag as inappropriate

        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.

      • OlivierOlivier commented  ·   ·  Flag as inappropriate

        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 SmeetsGuido Smeets commented  ·   ·  Flag as inappropriate

        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.

      • cromwellryancromwellryan commented  ·   ·  Flag as inappropriate

        This will also help with the nasty problem of csproj merge conflicts because of high churn.

      • cromwellryancromwellryan commented  ·   ·  Flag as inappropriate

        Think of this like .ignore files for Visual Studio rather than .includes. You add more often than you ignore.

      Feedback and Knowledge Base