ErikEJ.DacFX.TSQLAnalyzer
1.0.39
Prefix Reserved
Requires NuGet 5.0 or higher.
dotnet add package ErikEJ.DacFX.TSQLAnalyzer --version 1.0.39
NuGet\Install-Package ErikEJ.DacFX.TSQLAnalyzer -Version 1.0.39
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="ErikEJ.DacFX.TSQLAnalyzer" Version="1.0.39" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ErikEJ.DacFX.TSQLAnalyzer" Version="1.0.39" />
<PackageReference Include="ErikEJ.DacFX.TSQLAnalyzer" />
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 ErikEJ.DacFX.TSQLAnalyzer --version 1.0.39
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ErikEJ.DacFX.TSQLAnalyzer, 1.0.39"
#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.
#:package ErikEJ.DacFX.TSQLAnalyzer@1.0.39
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ErikEJ.DacFX.TSQLAnalyzer&version=1.0.39
#tool nuget:?package=ErikEJ.DacFX.TSQLAnalyzer&version=1.0.39
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ErikEJ.DacFX.TSQLAnalyzer
This .NET 8 library allows you to run 140+ static T-SQL code analysis rules against .sql files, and report any rule violations.
Installation
Install the latest package from NuGet.
Getting started
Once installed, you can use the library to analyze T-SQL files. The library comes with a couple of useful extension methods to help you format the output of the analysis.
using ErikEJ.DacFX.TSQLAnalyzer;
using ErikEJ.DacFX.TSQLAnalyzer.Extensions;
var files = new List<string> { "C:\\scripts\\sproc.sql" };
var analyzerOptions = new AnalyzerOptions();
analyzerOptions.Scripts.AddRange(files);
var analyzerFactory = new AnalyzerFactory(analyzerOptions);
AnalyzerResult result;
try
{
result = analyzerFactory.Analyze();
}
catch (ArgumentException aex)
{
Console.WriteLine(aex.Message);
return 1;
}
if (result?.Result == null)
{
Console.WriteLine("No result from analysis");
return 1;
}
foreach (var err in result.Result.InitializationErrors)
{
Console.WriteLine(err.Message);
}
foreach (var err in result.Result.SuppressionErrors)
{
Console.WriteLine(err.Message);
}
foreach (var err in result.Result.AnalysisErrors)
{
Console.WriteLine(err.Message);
}
if (result.ModelErrors.Count > 0)
{
foreach (var dex in result.ModelErrors)
{
Console.WriteLine(dex.Value.Format(dex.Key));
}
}
if (result.Result.AnalysisSucceeded)
{
foreach (var err in result.Result.Problems)
{
var warning = err.GetOutputMessage(analyzerOptions.Rules);
Console.WriteLine(warning);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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.
-
net10.0
- editorconfig (>= 0.15.0)
- ErikEJ.DacFX.SqlServer.Rules (>= 3.2.0-preview.1)
- ErikEJ.DacFX.TSQLSmellSCA (>= 3.0.0)
- Microsoft.SqlServer.DacFx (>= 170.3.93)
- System.ComponentModel.Composition (>= 8.0.0)
-
net8.0
- editorconfig (>= 0.15.0)
- ErikEJ.DacFX.SqlServer.Rules (>= 3.2.0-preview.1)
- ErikEJ.DacFX.TSQLSmellSCA (>= 3.0.0)
- Microsoft.SqlServer.DacFx (>= 170.3.93)
- System.ComponentModel.Composition (>= 8.0.0)
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.39 | 48 | 2/28/2026 |
| 1.0.38 | 97 | 2/13/2026 |
| 1.0.37 | 90 | 2/13/2026 |
| 1.0.36 | 112 | 1/4/2026 |
| 1.0.35 | 223 | 11/10/2025 |
| 1.0.34 | 190 | 9/3/2025 |
| 1.0.33 | 163 | 8/22/2025 |
| 1.0.32 | 271 | 8/6/2025 |
| 1.0.31 | 159 | 7/30/2025 |
| 1.0.30 | 147 | 7/29/2025 |
| 1.0.29 | 217 | 6/17/2025 |
| 1.0.28 | 328 | 6/10/2025 |
| 1.0.27 | 324 | 6/9/2025 |
| 1.0.26 | 293 | 6/9/2025 |
| 1.0.25 | 195 | 5/27/2025 |
| 1.0.24 | 220 | 5/5/2025 |
| 1.0.23 | 195 | 4/30/2025 |
| 1.0.22 | 218 | 4/24/2025 |
| 1.0.21 | 254 | 4/16/2025 |
| 1.0.20 | 207 | 4/10/2025 |
Loading failed
.dacpac and SQL Server support