如何更改* .db的默认位置?

时间:2021-10-01 22:41:01

I'm using the new Visual Studio 2017. I follow this tutorial to change the default (temp) path where store .db and such.

我正在使用新的Visual Studio 2017.我按照本教程更改存储.db等的默认(临时)路径。

It correctly moves *.VC.db files, but I can still see these files into the .vs within the solution's folder:

它正确移动* .VC.db文件,但我仍然可以将这些文件看到解决方案文件夹中的.vs:

Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal

I'd like to also move these data. How can I do it?

我还要移动这些数据。我该怎么做?

1 个解决方案

#1


8  

The guide that is the source of all these tutorials and advices is https://blogs.msdn.microsoft.com/vcblog/2010/03/09/intellisensebrowsing-options-in-vc-2010/

作为所有这些教程和建议的来源的指南是https://blogs.msdn.microsoft.com/vcblog/2010/03/09/intellisensebrowsing-options-in-vc-2010/

You are trying to get rid from you *.db files in {ProjectDir}/.vs/{SolutionName}/v15{(VS version)}/ and following the old guide for ipch files you successfully moved Browse.VC.db fie. However

您试图摆脱{ProjectDir} /.vs/ {SolutionName} / v15 {(VS版)} /中的* .db文件,并按照旧的ipch文件指南,成功移动了Browse.VC.db fie。然而

Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal

Are not browsing files and have nothing to with Intellisense. They are Project Preload files and needed only to speed up VS hefty loading of solutions.

不是浏览文件而且与Intellisense没有任何关系。它们是Project Preload文件,仅用于加速VS大量加载解决方案。

The answer to your question: No, you can not move them to the other folder by the means of VS options. They are supposed to be internal matter of VS speeding up the openage.

您的问题的答案:不,您不能通过VS选项将它们移动到其他文件夹。他们应该是VS的内部事务,加快开放。

2 of this 3 files should disappear when you close the solution( the heaviest one will remain)

关闭解决方案时,此3个文件中的2个应该消失(最重的一个将保留)

However there is a lot you can do about it:

但是你可以做很多事情:

1)You can turn them off completely by Tools->Options->Text Editor->C/C++->Experimental in Enable Faster Project Load = False

1)您可以通过工具 - >选项 - >文本编辑器 - > C / C ++ - >实验启用更快的项目加载= False完全关闭它们

2) If you'd like to leave project load(I don't feel much difference, but maybe I don't have very big projects) you can always clean files ad hoc by Project->Properties->Build Event->Post Build and entering any console command you'd like removing files from that folder- that will happen each build, which is what you want in the end when you close it.

2)如果你想留下项目负载(我感觉不太大,但也许我没有很大的项目)你总是可以通过Project-> Properties-> Build Event-> Post来临时清理文件构建并输入您希望从该文件夹中删除文件的任何控制台命令 - 这将在每次构建时发生,这是您在关闭它时最终想要的。

3) You can hack their size to zero by using symlinks - just create symlink with the same name(by a script, maybe) that to points to the location you like and VS won't spot the difference.

3)你可以通过使用符号链接将它们的大小破解为零 - 只需创建具有相同名称的符号链接(通过脚本,也许),指向你喜欢的位置,VS不会发现差异。

Also, you can turn off browsing db in the Advanced - it will turn off Intellisense (or leave where you moved it).

此外,您可以在高级中关闭浏览数据库 - 它将关闭智能感知(或离开您移动它的位置)。

I hope it helps to solve this issue with heavy untransportable files.

我希望通过繁重的不可传输文件解决这个问题是有帮助的。

#1


8  

The guide that is the source of all these tutorials and advices is https://blogs.msdn.microsoft.com/vcblog/2010/03/09/intellisensebrowsing-options-in-vc-2010/

作为所有这些教程和建议的来源的指南是https://blogs.msdn.microsoft.com/vcblog/2010/03/09/intellisensebrowsing-options-in-vc-2010/

You are trying to get rid from you *.db files in {ProjectDir}/.vs/{SolutionName}/v15{(VS version)}/ and following the old guide for ipch files you successfully moved Browse.VC.db fie. However

您试图摆脱{ProjectDir} /.vs/ {SolutionName} / v15 {(VS版)} /中的* .db文件,并按照旧的ipch文件指南,成功移动了Browse.VC.db fie。然而

Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal

Are not browsing files and have nothing to with Intellisense. They are Project Preload files and needed only to speed up VS hefty loading of solutions.

不是浏览文件而且与Intellisense没有任何关系。它们是Project Preload文件,仅用于加速VS大量加载解决方案。

The answer to your question: No, you can not move them to the other folder by the means of VS options. They are supposed to be internal matter of VS speeding up the openage.

您的问题的答案:不,您不能通过VS选项将它们移动到其他文件夹。他们应该是VS的内部事务,加快开放。

2 of this 3 files should disappear when you close the solution( the heaviest one will remain)

关闭解决方案时,此3个文件中的2个应该消失(最重的一个将保留)

However there is a lot you can do about it:

但是你可以做很多事情:

1)You can turn them off completely by Tools->Options->Text Editor->C/C++->Experimental in Enable Faster Project Load = False

1)您可以通过工具 - >选项 - >文本编辑器 - > C / C ++ - >实验启用更快的项目加载= False完全关闭它们

2) If you'd like to leave project load(I don't feel much difference, but maybe I don't have very big projects) you can always clean files ad hoc by Project->Properties->Build Event->Post Build and entering any console command you'd like removing files from that folder- that will happen each build, which is what you want in the end when you close it.

2)如果你想留下项目负载(我感觉不太大,但也许我没有很大的项目)你总是可以通过Project-> Properties-> Build Event-> Post来临时清理文件构建并输入您希望从该文件夹中删除文件的任何控制台命令 - 这将在每次构建时发生,这是您在关闭它时最终想要的。

3) You can hack their size to zero by using symlinks - just create symlink with the same name(by a script, maybe) that to points to the location you like and VS won't spot the difference.

3)你可以通过使用符号链接将它们的大小破解为零 - 只需创建具有相同名称的符号链接(通过脚本,也许),指向你喜欢的位置,VS不会发现差异。

Also, you can turn off browsing db in the Advanced - it will turn off Intellisense (or leave where you moved it).

此外,您可以在高级中关闭浏览数据库 - 它将关闭智能感知(或离开您移动它的位置)。

I hope it helps to solve this issue with heavy untransportable files.

我希望通过繁重的不可传输文件解决这个问题是有帮助的。