什么是Sqlite数据库在我的项目的.vs文件夹中做什么?

时间:2021-05-08 23:02:32

I have now noticed this in VS 2017 in a Core console app, and a standard .NET Framework MVC app. It is named <solution-name>.sqlite, and has the following tables:

我现在已经在VS 2017中的Core控制台应用程序和标准.NET Framework MVC应用程序中注意到了这一点。它被命名为 .sqlite,并具有以下表:

FileScannerCache
FileSystemData
FileSystemEntity
FileSystemReference
ProviderEntity
Setting
SymbolDefinition

It seems to contain MSBuild related data, but when I query some tables, like

它似乎包含MSBuild相关数据,但是当我查询一些表时,就像

select * from FileScannerCache

I get the error System.FormatException: String was not recognised as a valid DateTime. I'm using the Sqlite/SQL Server Compact Toolbox to examine and query this db.

我收到错误System.FormatException:String未被识别为有效的DateTime。我正在使用Sqlite / SQL Server Compact Toolbox来检查和查询此数据库。

2 个解决方案

#1


13  

This file seems to be related to the "Lightweight Solution Load" (LSL) functionality in VS2017. If you disable LSL in your solution, delete the file from the directory and open your solution you will see that it is not recreated. However, enable LSL for the solution again and open your solution, you will see the file created again. I presume it is being used as a form of cacheing information to enable the LSL functionality.

该文件似乎与VS2017中的“轻量级解决方案加载”(LSL)功能有关。如果在解决方案中禁用LSL,请从目录中删除该文件并打开解决方案,您将看到它未重新创建。但是,再次为解决方案启用LSL并打开解决方案,您将再次看到创建的文件。我认为它被用作缓存信息的一种形式,以启用LSL功能。

As an aside, all info in the .vs folder is supposed to be safe to exclude from source control.

另外,.vs文件夹中的所有信息都可以安全地从源代码管理中排除。

#2


1  

If you ended up here because you are getting

如果你因为你的到来而来到这里

 Git failed with a fatal error.
 error: open(".vs/Onion/v15/Server/sqlite3/db.lock"): Permission denied
 fatal: Unable to process path .vs/Onion/v15/Server/sqlite3/db.lock

Then Team Explorer > Settings > Repository Settings > Add /.gitignore. It should now have .vs

然后是团队资源管理器>设置>存储库设置>添加/.gitignore。它现在应该有.vs

# Visual Studio 2015 cache/options directory
.vs/

Fixes issue.

修复问题。

#1


13  

This file seems to be related to the "Lightweight Solution Load" (LSL) functionality in VS2017. If you disable LSL in your solution, delete the file from the directory and open your solution you will see that it is not recreated. However, enable LSL for the solution again and open your solution, you will see the file created again. I presume it is being used as a form of cacheing information to enable the LSL functionality.

该文件似乎与VS2017中的“轻量级解决方案加载”(LSL)功能有关。如果在解决方案中禁用LSL,请从目录中删除该文件并打开解决方案,您将看到它未重新创建。但是,再次为解决方案启用LSL并打开解决方案,您将再次看到创建的文件。我认为它被用作缓存信息的一种形式,以启用LSL功能。

As an aside, all info in the .vs folder is supposed to be safe to exclude from source control.

另外,.vs文件夹中的所有信息都可以安全地从源代码管理中排除。

#2


1  

If you ended up here because you are getting

如果你因为你的到来而来到这里

 Git failed with a fatal error.
 error: open(".vs/Onion/v15/Server/sqlite3/db.lock"): Permission denied
 fatal: Unable to process path .vs/Onion/v15/Server/sqlite3/db.lock

Then Team Explorer > Settings > Repository Settings > Add /.gitignore. It should now have .vs

然后是团队资源管理器>设置>存储库设置>添加/.gitignore。它现在应该有.vs

# Visual Studio 2015 cache/options directory
.vs/

Fixes issue.

修复问题。