Meziantou.NET.Sdk
1.0.64
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Meziantou.NET.Sdk --version 1.0.64
NuGet\Install-Package Meziantou.NET.Sdk -Version 1.0.64
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="Meziantou.NET.Sdk" Version="1.0.64" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.NET.Sdk" Version="1.0.64" />
<PackageReference Include="Meziantou.NET.Sdk" />
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 Meziantou.NET.Sdk --version 1.0.64
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.NET.Sdk, 1.0.64"
#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 Meziantou.NET.Sdk@1.0.64
#: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=Meziantou.NET.Sdk&version=1.0.64
#tool nuget:?package=Meziantou.NET.Sdk&version=1.0.64
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.NET.Sdk
MSBuild SDK that provides:
- Opinionated defaults for .NET projects
- Naming conventions
- Static analysis with Roslyn analyzers
- Set
ContinuousIntegrationBuildbased on the context - dotnet test features
- Dump on crash or hang
- Loggers when running on GitHub
- Disable Roslyn analyzers to speed up build
- Relevant NuGet packages based on the project type
Usage
Method 1
To use it, create a global.json file at the solution root with the following content:
{
"sdk": {
"version": "9.0.304"
},
"msbuild-sdks": {
"Meziantou.NET.Sdk": "1.0.16",
"Meziantou.NET.Sdk.BlazorWebAssembly": "1.0.16",
"Meziantou.NET.Sdk.Razor": "1.0.16",
"Meziantou.NET.Sdk.Test": "1.0.16",
"Meziantou.NET.Sdk.Web": "1.0.16",
"Meziantou.NET.Sdk.WindowsDesktop": "1.0.16"
}
}
And reference the SDK in your project file:
<Project Sdk="Meziantou.NET.Sdk">
</Project>
Method 2
You can the SDK by specifying the version inside the csproj file:
<Project Sdk="Meziantou.NET.Sdk/1.0.16">
</Project>
Method 3
<Project Sdk="Microsoft.NET.SDK">
<Sdk Name="Meziantou.NET.Sdk" Version="1.0.16" />
</Project>
Build configuration properties
Set these properties in your project file or a directory-level props file. Unless stated otherwise, defaults apply only when the property is empty.
General build
| Property | Default | Description |
|---|---|---|
ContinuousIntegrationBuild |
Auto-detected | Set to true or false to force CI behavior (warnings as errors, code style enforcement, SBOM, code coverage, npm locked mode). |
TargetFramework |
net$(NETCoreAppMaximumVersion) |
Used when both TargetFramework and TargetFrameworks are empty. |
GenerateSBOM |
true on CI |
Controls SBOM generation on CI builds. |
RollForward |
LatestMajor |
Applied for non-test projects when unset. |
SuppressNETCoreSdkPreviewMessage |
true |
Suppresses preview SDK message. |
PublishRepositoryUrl |
true |
Publishes repository URL in packages. |
DebugType |
embedded |
Embeds PDBs in the output. |
EmbedUntrackedSources |
true |
Embeds untracked sources in PDBs. |
ImplicitUsings |
enable |
Enables implicit global usings. |
Nullable |
enable |
Enables nullable reference types. |
GenerateDocumentationFile |
true |
Generates XML docs. |
RestoreUseStaticGraphEvaluation |
false |
Disables static graph restore. |
RestoreSerializeGlobalProperties |
true |
Serializes global properties for restore. |
ReportAnalyzer |
true |
Enables analyzer reporting. |
Features |
strict |
Enables strict compiler features. |
Deterministic |
true |
Enables deterministic builds. |
EnableNETAnalyzers |
true |
Enables .NET analyzers. |
AnalysisLevel |
latest-all |
Uses the latest analyzer rules. |
AllowUnsafeBlocks |
true |
Allows unsafe code blocks. |
LangVersion |
latest |
Uses the latest C# language version. |
MSBuildTreatWarningsAsErrors |
true on CI or Release |
Treats MSBuild warnings as errors. |
TreatWarningsAsErrors |
true on CI or Release |
Treats compiler warnings as errors. |
EnforceCodeStyleInBuild |
true on CI or Release |
Enforces analyzer code style during builds. |
AccelerateBuildsInVisualStudio |
true |
Enables faster builds in Visual Studio. |
Package validation and auditing
| Property | Default | Description |
|---|---|---|
EnablePackageValidation |
true |
Enables package validation when unset. |
NuGetAudit |
true |
Enables NuGet vulnerability auditing. |
NuGetAuditMode |
all |
Audits all dependency types. |
NuGetAuditLevel |
low |
Minimum severity level to report. |
WarningsAsErrors |
Adds NU1900–NU1904 on CI or Release |
Promotes NuGet audit warnings to errors. |
Banned symbols and analyzers
| Property | Default | Description |
|---|---|---|
IncludeDefaultBannedSymbols |
true |
Includes the default banned API list. |
BannedNewtonsoftJsonSymbols |
true |
Includes banned Newtonsoft.Json APIs. |
Disable_SponsorLink |
true |
Removes SponsorLink and Moq analyzers when not set to false. |
Web SDK and containers
| Property | Default | Description |
|---|---|---|
AutoRegisterServiceDefaults |
true |
Adds ServiceDefaults auto-registration for web projects unless set to false. |
EnableSdkContainerSupport |
true on GitHub Actions |
Enables container support for web projects on GitHub Actions. |
ContainerRegistry |
ghcr.io |
Default container registry. |
ContainerRepository |
From GitHub repository | Default repository name when running on GitHub Actions. |
ContainerImageTagsMainVersionPrefix |
1.0 |
Prefix used to generate tags on the main branch. |
ContainerImageTagsIncludeLatest |
true |
Appends latest tag on main. |
ContainerImageTags |
Computed | Uses build number on main and 0.0.1-preview.$(GITHUB_SHA) elsewhere when unset. |
Packaging metadata
| Property | Default | Description |
|---|---|---|
SearchReadmeFileAbove |
false |
When true, searches parent directories for a README to pack. |
PackageIcon |
icon.png for Meziantou projects | Default icon when the project name starts with Meziantou and no value is set. |
Authors |
meziantou for Meziantou projects |
Default authors when the project name starts with Meziantou and no value is set. |
Company |
meziantou for Meziantou projects |
Default company when the project name starts with Meziantou and no value is set. |
PackageLicenseExpression |
MIT for Meziantou projects |
Default license expression when the project name starts with Meziantou and no value is set. |
PackageReadmeFile |
README.md when found | Default README packing behavior when a README exists. |
npm restore
| Property | Default | Description |
|---|---|---|
EnableDefaultNpmPackageFile |
Enabled when unset | Enables automatic package.json inclusion as NpmPackageFile (set to false to disable). |
NpmRestoreLockedMode |
true on CI or when RestoreLockedMode is true |
Uses npm ci when true, otherwise npm install. |
Testing
| Property | Default | Description |
|---|---|---|
EnableCodeCoverage |
true on CI |
Enables code coverage collection on CI. |
OptimizeVsTestRun |
true |
Disables analyzers during dotnet test unless set to false. |
UseMicrosoftTestingPlatform |
Auto | Uses MTP when set to true or when xunit.v3.mtp-v2 is referenced. |
EnableDefaultTestSettings |
true |
Adds default crash/hang dumps and loggers. |
TestingPlatformCommandLineArguments |
Appended | Adds MTP arguments such as --report-trx and --coverage when enabled. |
VSTestBlame |
true |
Enables VSTest blame. |
VSTestBlameCrash |
true |
Enables crash dumps. |
VSTestBlameCrashDumpType |
mini |
Sets crash dump type. |
VSTestBlameHang |
true |
Enables hang dumps. |
VSTestBlameHangDumpType |
mini |
Sets hang dump type. |
VSTestBlameHangTimeout |
10min |
Sets hang dump timeout. |
VSTestCollect |
Code Coverage when enabled |
Enables VSTest code coverage. |
VSTestSetting |
Default runsettings when enabled | Uses the default runsettings file for coverage. |
VSTestLogger |
trx;console%3bverbosity=normal |
Appends loggers, including GitHub Actions on CI. |
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has 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.71 | 1,254 | 3/1/2026 |
| 1.0.70 | 135 | 2/28/2026 |
| 1.0.69 | 159 | 2/25/2026 |
| 1.0.68 | 151 | 2/24/2026 |
| 1.0.67 | 197 | 2/21/2026 |
| 1.0.66 | 180 | 2/21/2026 |
| 1.0.65 | 730 | 2/14/2026 |
| 1.0.64 | 129 | 2/14/2026 |
| 1.0.63 | 295 | 2/4/2026 |
| 1.0.62 | 198 | 2/1/2026 |
| 1.0.61 | 1,066 | 1/30/2026 |
| 1.0.60 | 620 | 1/20/2026 |
| 1.0.59 | 464 | 1/18/2026 |
| 1.0.58 | 397 | 1/18/2026 |
| 1.0.57 | 206 | 1/17/2026 |
| 1.0.56 | 238 | 1/17/2026 |
| 1.0.55 | 212 | 1/16/2026 |
| 1.0.54 | 796 | 1/13/2026 |
| 1.0.53 | 131 | 1/13/2026 |
| 1.0.52 | 772 | 1/12/2026 |
Loading failed