I have a problem in visual studio, everytime i create a new repo and try to commit a bunch of files apears: .vsidx, .cahce, .props etc. I have never come across anything like this before and my question is how to get rid of these files and also why are they appearing? For your info i have Visual studio community 2022 17.3.4
Asked
Active
Viewed 3,840 times
2
-
1These sound like auto-generated files. You probably need to configure a .gitignore. – Timothy G. Sep 20 '22 at 13:29
-
I have tried with a .gitignore but I wanna now why the files are auto-generated and how to get rid of them for this project and for my future projects! – Oskar Virdarson Sep 20 '22 at 13:37
-
1Anything in the *hidden* .vs folder needs to be ignored. Also check https://stackoverflow.com/a/39520183/17034 – Hans Passant Sep 20 '22 at 14:21
1 Answers
2
These files are generated in different scenarios and sometimes you can't really restrict Visual Studio from creating them:
.vsidx
generated by enabling indexing for faster find. You can disable them if you want: How to disable that new "FileContentIndex" folder (and .vsidx files) in VS 2022 17.2.0?
.cache
visual studio temporary files. You cannot really avoid visual studio creating these if it really needs them. That's why they're a default add to .gitignore.
.props and .target files
may be included when you reference NuGet packages that contain these files. You may add them to .gitignore

Cristian Rusanu
- 452
- 5
- 15
-
1Thanks for the answer Cristian! Good explaining but i forgot to add in my question that I've done some reasearch including the link you posted and it haven't been to any help unfortunatley... – Oskar Virdarson Sep 20 '22 at 14:32