ErikEJ.DacFX.SqlServer.Rules
5.1.1
Prefix Reserved
Requires NuGet 5.0 or higher.
dotnet add package ErikEJ.DacFX.SqlServer.Rules --version 5.1.1
NuGet\Install-Package ErikEJ.DacFX.SqlServer.Rules -Version 5.1.1
<PackageReference Include="ErikEJ.DacFX.SqlServer.Rules" Version="5.1.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ErikEJ.DacFX.SqlServer.Rules" Version="5.1.1" />
<PackageReference Include="ErikEJ.DacFX.SqlServer.Rules"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ErikEJ.DacFX.SqlServer.Rules --version 5.1.1
#r "nuget: ErikEJ.DacFX.SqlServer.Rules, 5.1.1"
#:package ErikEJ.DacFX.SqlServer.Rules@5.1.1
#addin nuget:?package=ErikEJ.DacFX.SqlServer.Rules&version=5.1.1
#tool nuget:?package=ErikEJ.DacFX.SqlServer.Rules&version=5.1.1
SqlServer.Rules
This project implements a number of SQL Server static code analysis rules, and publishes these as a NuGet package.
Supported Project Types
The NuGet package works with:
- Modern SDK-style projects: Microsoft.Build.Sql and MSBuild.Sdk.SqlProj
- Classic .sqlproj: Legacy SSDT projects - requires Visual Studio with SQL Server Data Tools (SSDT) and manual setup to use the analyzer DLL.
Getting Started
For Modern SDK-style Projects
Add the NuGet package to your project:
dotnet add package ErikEJ.DacFX.SqlServer.Rules
Add the following to your .csproj or .sqlproj file:
<PropertyGroup>
<RunSqlCodeAnalysis>True</RunSqlCodeAnalysis>
</PropertyGroup>
The rules will automatically run during build. See our MSBuild.Sdk.SqlProj documentation for advanced configuration.
More Information
See my blog post here for a detailed guide on using these rules in your SQL projects.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- System.ComponentModel.Composition (>= 4.7.0)
-
.NETStandard 2.1
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ErikEJ.DacFX.SqlServer.Rules:
| Package | Downloads |
|---|---|
|
ErikEJ.DacFX.TSQLAnalyzer
A library for ad-hoc analysis of SQL scripts - see https://github.com/ErikEJ/SqlServer.Rules/blob/master/docs/readme.md |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on ErikEJ.DacFX.SqlServer.Rules:
| Repository | Stars |
|---|---|
|
ErikEJ/EFCorePowerTools
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
|
|
|
rr-wfm/MSBuild.Sdk.SqlProj
An MSBuild SDK that provides similar functionality to SQL Server Data Tools (.sqlproj) projects
|
| Version | Downloads | Last Updated |
|---|---|---|
| 5.1.1 | 149 | 7/11/2026 |
| 5.1.0 | 1,157 | 6/23/2026 |
| 5.1.0-preview.1 | 70 | 6/14/2026 |
| 5.0.0 | 5,010 | 5/13/2026 |
| 5.0.0-preview.4 | 89 | 5/12/2026 |
| 5.0.0-preview.3 | 109 | 5/11/2026 |
| 5.0.0-preview.2 | 58 | 5/11/2026 |
| 5.0.0-preview.1 | 123 | 5/9/2026 |
| 4.2.0 | 3,601 | 4/23/2026 |
| 4.2.0-preview.4 | 675 | 4/10/2026 |
| 4.2.0-preview.3 | 78 | 4/10/2026 |
| 4.2.0-preview.2 | 72 | 4/10/2026 |
| 4.2.0-preview.1 | 273 | 4/8/2026 |
| 4.0.0 | 5,493 | 3/30/2026 |
| 4.0.0-preview.1 | 146 | 3/20/2026 |
| 3.2.0 | 7,892 | 3/4/2026 |
| 3.2.0-preview.1 | 169 | 2/28/2026 |
| 3.1.1 | 6,087 | 2/13/2026 |
| 3.1.0 | 6,951 | 1/4/2026 |
| 3.0.2 | 614 | 1/3/2026 |