Opinionated MSBuild SDK for .NET projects.
global.json:
{
"msbuild-sdks": {
"ANcpLua.NET.Sdk": "3.4.31",
"ANcpLua.NET.Sdk.Web": "3.4.31",
"ANcpLua.NET.Sdk.Test": "3.4.31"
}
}<!-- Library/Console/Worker -->
<Project Sdk="ANcpLua.NET.Sdk"></Project>
<!-- Web API -->
<Project Sdk="ANcpLua.NET.Sdk.Web"></Project>
<!-- Test -->
<Project Sdk="ANcpLua.NET.Sdk.Test"></Project>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:
<!-- Directory.Packages.props -->
<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.
- 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.