ANcpLua.NET.Sdk.Templates 4.0.1

dotnet new install ANcpLua.NET.Sdk.Templates@4.0.1
                    
This package contains a .NET Template Package you can call from the shell/command line.

NuGet .NET 11 License

ANcpLua.NET.Sdk

Opinionated MSBuild SDK for .NET projects.

Quick Start

global.json:

{
  "sdk": {
    "version": "11.0.100",
    "rollForward": "latestFeature"
  },
  "msbuild-sdks": {
    "ANcpLua.NET.Sdk": "4.0.1",
    "ANcpLua.NET.Sdk.Web": "4.0.1",
    "ANcpLua.NET.Sdk.Test": "4.0.1"
  }
}

Requires .NET SDK 11.0.100 or later; the build stops with a POLICY error on an older SDK.


<Project Sdk="ANcpLua.NET.Sdk"></Project>


<Project Sdk="ANcpLua.NET.Sdk.Web"></Project>


<Project Sdk="ANcpLua.NET.Sdk.Test"></Project>

Central Package Management is mandatory

All variants force <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> (and the enforcement target errors if a consumer overrides it). Every consuming repo must ship a Directory.Packages.props at or above the consumer's directory — even an empty one suffices:


<Project>
  <PropertyGroup>
    <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
  </PropertyGroup>
</Project>

Without it, restore fails with NU1015: PackageReference items do not have a version specified on the SDK-injected analyzers (ANcpLua.Analyzers, Microsoft.CodeAnalysis.BannedApiAnalyzers) because the SDK switches them to GlobalPackageReference, which only resolves through CPM.

Moving to 4.0

4.0 moves the version truth to .NET 11: .NET SDK 11.0.100, Roslyn 5.12.0, ANcpLua.Analyzers 3.0.0, the 11.0 runtime and ASP.NET Core packages (DotNetRuntimeVersion 11.0.0), Microsoft.Extensions 11.0.1, Basic.Reference.Assemblies 1.8.15, and a net11.0 default for projects that declare no target framework. ANcpLua.Analyzers 3.0.0 is compiled against Roslyn 5.12, so an older compiler reports CS9057 and runs none of its rules — that is why the SDK now requires SDK 11.

Renovate opens one dotnet-11 PR per consumer that moves sdk.version and the msbuild-sdks entries together. Finish that PR on its branch:

  1. Target framework. Change net10.0 to net11.0 (keep netstandard2.0 for analyzers and generators). Packages pinned to $(AspNetCoreVersion) or $(DotNetRuntimeVersion) are 11.0 now and restore only for net11.0 (NU1202 otherwise). net11.0 defaults to C# 15; don't add LangVersion.
  2. Other .NET 10 pins. A mise.toml dotnet line, dotnet-version/container images in CI and Dockerfiles (mcr.microsoft.com/dotnet/*:10.0 to 11.0).
  3. Local overrides. In a repo-local Version.props, delete entries that are now equal to or below the SDK's values.
  4. New findings. Build with -c Release (warnings are errors there). The usual ones:
    • IDE0028: collection initializers with constructor arguments become C# 15 collection expression arguments: new HashSet<string>(StringComparer.Ordinal) { "a" } becomes [with(StringComparer.Ordinal), "a"]. A Dictionary takes with(...) only with no elements (CS9215 otherwise), so fill it after creating it. dotnet format style --diagnostics IDE0028 applies the fix.
    • New .NET 11 CA rules ship as suggestions (see src/Config/Analyzer.Microsoft.CodeAnalysis.NetAnalyzers.editorconfig).
    • Analyzer or generator projects that compile against Roslyn 5.12 get ITypeSymbol.IsUnion, IsClosed, GetClosedDerivedTypeInfo and UnionCaseTypes as stable APIs; drop RSEXPERIMENTAL006 suppressions and LanguageVersion.Preview workarounds for C# 15.

Documentation

  • ANcpLua.Analyzers rules — the 89 AL00xx/AL18xx diagnostics this SDK auto-injects, organized by domain band.
  • Per-rule editorconfig profile — the severity table shipped alongside the SDK; consumers override individual rules via the standard dotnet_diagnostic.{ID}.severity = … form.

Initial architecture inspired by Meziantou.NET.Sdk.

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
4.0.1 114 11/23/2026
3.4.51 222 10/19/2026
3.4.50 154 10/19/2026
3.4.49 186 10/14/2026
3.4.48 164 10/14/2026
3.4.47 238 9/4/2026
3.4.46 230 8/27/2026
3.4.45 302 7/22/2026
3.4.44 293 7/16/2026
3.4.43 285 7/16/2026
3.4.42 353 6/10/2026
3.4.41 345 6/2/2026
3.4.40 351 5/29/2026
3.4.39 355 5/28/2026
3.4.38 349 5/28/2026
3.4.37 350 5/28/2026
3.4.36 351 5/26/2026
3.4.35 356 5/25/2026
3.4.34 367 5/18/2026
3.4.33 355 5/16/2026
Loading failed