Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Sqlite database doing in my project's .vs folder?

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:

FileScannerCache FileSystemData FileSystemEntity FileSystemReference ProviderEntity Setting SymbolDefinition 

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

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.

like image 716
ProfK Avatar asked Mar 15 '17 04:03

ProfK


People also ask

What is a SQLite file used for?

SQLite is often used as the on-disk file format for desktop applications such as version control systems, financial analysis tools, media cataloging and editing suites, CAD packages, record keeping programs, and so forth.

What is an SQLite folder?

An SQLITE file contains a database created with SQLite, a lightweight (RDBMS) widely used in application development for storing embedded databases. SQLITE files are often created by software developers for storing data used by their applications.

Where is the SQLite database stored?

The Android SDK provides dedicated APIs that allow developers to use SQLite databases in their applications. The SQLite files are generally stored on the internal storage under /data/data/<packageName>/databases.


2 Answers

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.

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

like image 59
Quintus Marais Avatar answered Sep 28 '22 02:09

Quintus Marais


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

# Visual Studio 2015 cache/options directory .vs/ 

Fixes issue.

like image 33
Sigex Avatar answered Sep 28 '22 04:09

Sigex