LiteDb.VersionChecker 1.0.1

dotnet add package LiteDb.VersionChecker --version 1.0.1
                    
NuGet\Install-Package LiteDb.VersionChecker -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LiteDb.VersionChecker" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteDb.VersionChecker" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="LiteDb.VersionChecker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LiteDb.VersionChecker --version 1.0.1
                    
#r "nuget: LiteDb.VersionChecker, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=LiteDb.VersionChecker&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=LiteDb.VersionChecker&version=1.0.1
                    
Install as a Cake Tool

LiteDb.VersionChecker

LiteDb.VersionChecker is a lightweight .NET utility that determines whether a .db file was created with LiteDB 4 or LiteDB 5, by analyzing the binary file header — no database open required.

Features

  • 🧠 Detects LiteDB 4 files (datafile version 7)
  • ✅ Detects LiteDB 5 files (datafile version 8)
  • 🔒 Supports encrypted LiteDB 5 files
  • ⚡ Fast and dependency-free
  • 🔧 Compatible with .NET Standard 2.0+ / .NET 6+

Usage

string version = LiteDbVersionDetector.DetectLiteDbVersion("path/to/file.db");
Console.WriteLine(version); // "LiteDB 4", "LiteDB 5" or "No LiteDB file"

File Format Logic

LiteDb.VersionChecker reads the first 1024 bytes of the file and inspects known headers:

Version Header Offset Version Offset Byte Value
LiteDB 4 25 52 7
LiteDB 5 32 59 8
Encrypted 0 - 1

License

MIT — Free for commercial and personal use.

Project maintained by @zalza13

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 161 4/9/2025
1.0.0 163 4/9/2025