Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2017 opening .sln automatically opens same files

When I open my solution file with Visual Studio 2017 (ver 15.7.5) it always automatically opens the same 2 .cs files. How can I prevent that? Why does it opens those specific 2 files?

No they're not the last files I had opened last time I closed my solution.

like image 205
danbord Avatar asked Dec 16 '25 19:12

danbord


1 Answers

All personal settings for a solution in Visual Studio 2017 are stored in a folder called .vs which is in the root of your repository. There's a couple of possibilities as to why your settings aren't changing:

  1. The files have become corrupt and/or readonly for some reason. To fix this, just delete the folder. It's not crucial to anything and will get recreated automatically.
  2. You have mistakenly committed the .vs folder to source control. Delete the folder from your source control and make sure it isn't readded by making sure that folder is ignored. A good way to do this with Git is to use this for your .gitignore file.
like image 96
DavidG Avatar answered Dec 20 '25 12:12

DavidG



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!