ChatGPT解决这个技术问题 Extra ChatGPT

我的 Visual Studio 解决方案文件夹下的“storage.ide”文件是什么,什么是“持久存储”?

I just installed Visual Studio 2017 15.3 preview, and now I'm noticing a new file beneath an existing solution that I've been working on:

.vs\[SOLUTION NAME]\v15\sqlite3\storage.ide

I'm wondering if I should be adding this to my version control repo, or if I should put it on the ignore list (i.e. if it's a user/setting based file, like .suo files). I've been googling trying to figure out what it is and what it does, but there's barely any info about it. I've searched things like "visual studio sqlite3 storage.ide" which have lead me to pages like this reference source for the SQLitePersistentStorageService class, so I gather it has something to do with code analysis, but I can't find any other information at all about the SQLitePersistentStorageService class.

What is this file for, and should I be keeping it in version control?

Started seeing this after an upgrade to VS 2017 15.3.1 at work. The .gitignore file did exclude .vs. Cause was a solution file in a subfolder of root. Someone had previously committed that solutions's .vs folder to Git so I had to first delete the local folder and commit that change, the .vs folder exclusion was then honored.
To delete from remote Git repo but not local filesystem: stackoverflow.com/q/1143796

D
DavidG

Everything in the .vs folder should be excluded from your source repository. It is a folder created by Visual Studio for storing user specific information. Previously there was a .suo file which held this data.The change came from a UserVoice suggestion.

Additionally, there's a very useful GitHub repo that has common .gitignore files for various project types and you will see that the Visual Studio version completely excludes this folder too.


I've added .vs/ to the .gitignore file, but storage.ide keeps showing up as changed. Any thoughts ?
Manually remove the file from git-cache solved the issue. stackoverflow.com/questions/45802083/…
@BrilBroeder i checked out the file and it worked it too: git checkout -- .vs/[SolutionName]/v15/sqlite3/storage.ide
a
army

Even after adding the .vs folder like the answer correctly suggested, I still had issues with the storage.ide being in my branch and not being able to switch. I tried clearing the git cache like this answer suggested, but it was still blocking me switching branches.

I soon realised though that I was the one being stupid and I had VS2015 and VS2017 open with the same project (and obviously same repo) and 2017 was blocking the storage.ide file.

Closing 2015 and ignoring the storage.ide file in VS2017 sorted this issue.

Hope this might help others..