10

I'm working on an ASP.NET MVC project in Visual Studio 2015 Community, using git as the VCS via Visual Studio's built-in git support in Team Explorer.

Whenever I edit a file, the edited file shows up in Team Explorer's Changes list as expected, but the website project's .csproj file is also added to the Changes list. Note, this happens when I just edit a file (e.g. a JavaScript file) in the project, without making any changes to the project itself (like adding/removing a file).

Clicking the Stage All button will stage the file I've changed, but not the .csproj file. Diffing the .csproj file in Beyond Compare reveales that (as expected) it's identical to the previous version. Nothing has changed (not even the line ending type).

The only way to clear the .csproj file from the Changes list is to right-click and Undo Changes.

It's not a critical problem, it's just annoying. Any idea why this is happening and how I stop it?

(Environment details: Visual Studio 2015 Community Update 3, ReSharper Ultimate 2016.1.2, both Windows 7 and Windows 10)

Mark Whitaker
  • 8,465
  • 8
  • 44
  • 68
  • Maybe related: http://stackoverflow.com/questions/1085978/how-to-stop-visual-studio-from-always-checking-out-solution-files – Hackerman Jul 06 '16 at 13:57
  • @Hackerman That ticket is about TFS which works differently from Git, so I think it's not related. – Kapé Nov 19 '20 at 09:47
  • Didn't have this issue for a long time, but it is showing up again for me in Visual Studio 2019 (version 16.8.1) – Kapé Nov 19 '20 at 09:49
  • This issue is fixed in Visual Studio 2019 version 16.8.2. As per this link https://developercommunity.visualstudio.com/t/updating-visual-studio-causes-fake-changes-to-cspr/1193944 – Utsav Dawn Mar 09 '21 at 11:32
  • Thank you @UtsavDawn! If you add that as an answer I'll accept it. – Mark Whitaker Mar 11 '21 at 11:37
  • 1
    @MarkWhitaker Thanks! I have added it as an answer. – Utsav Dawn Mar 15 '21 at 15:03

1 Answers1

1

This issue is fixed in Visual Studio 2019 version 16.8.2. As per this link from Visual Studio developer community.

Utsav Dawn
  • 7,896
  • 2
  • 29
  • 44