ANcpLua.NET.Sdk.Templates
4.0.1
dotnet new install ANcpLua.NET.Sdk.Templates@4.0.1
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:
- Target framework. Change
net10.0tonet11.0(keepnetstandard2.0for analyzers and generators). Packages pinned to$(AspNetCoreVersion)or$(DotNetRuntimeVersion)are 11.0 now and restore only fornet11.0(NU1202 otherwise).net11.0defaults to C# 15; don't addLangVersion. - Other .NET 10 pins. A
mise.tomldotnetline,dotnet-version/container images in CI and Dockerfiles (mcr.microsoft.com/dotnet/*:10.0to11.0). - Local overrides. In a repo-local
Version.props, delete entries that are now equal to or below the SDK's values. - 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"]. ADictionarytakeswith(...)only with no elements (CS9215otherwise), so fill it after creating it.dotnet format style --diagnostics IDE0028applies 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,GetClosedDerivedTypeInfoandUnionCaseTypesas stable APIs; dropRSEXPERIMENTAL006suppressions andLanguageVersion.Previewworkarounds 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.
Related
- ANcpLua.Analyzers — Custom Roslyn analyzers (auto-injected)
- ANcpLua.Roslyn.Utilities — Source generator utilities
- ANcpLua.Agents — MAF runtime helpers + agent test infrastructure
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 |