Skip to content

meziantou/Meziantou.NET.Sdk

Repository files navigation

Meziantou.NET.Sdk

  • Meziantou.NET.Sdk on NuGet

MSBuild SDK that provides:

  • Opinionated defaults for .NET projects
  • Naming conventions
  • Static analysis with Roslyn analyzers
  • Set ContinuousIntegrationBuild based 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>

About

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •