⚠ Deprecated: Legacy
Suggested alternative: ktsu.Sdk.App
A comprehensive, robust MSBuild-based SDK for .NET projects (.NET 5.0+, .NET Standard 2.0/2.1) with optimizations for .NET 9.0. Features intelligent project structure detection with hierarchical solution discovery, path-based namespace generation from directory structure, and comprehensive error handling that prevents common MSBuild failures. Includes advanced package management with multi-target support, automatic metadata integration from markdown files, source linking, and package validation. Streamlines cross-platform development with automatic project type detection, smart cross-project referencing, InternalsVisibleTo configuration for tests, and GitHub workflow integration. Designed for deeply nested project structures with graceful fallbacks and robust validation throughout.
$ dotnet add package ktsu.Sdk.WinAppA comprehensive, robust MSBuild-based SDK for .NET projects that standardizes configuration, metadata management, and package workflows. Features intelligent project structure detection, hierarchical solution discovery, and path-based namespace generation. Supports multiple .NET versions (.NET 5.0+, .NET Standard 2.0/2.1) with optimizations for .NET 9.0.
To use this SDK in your project:
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="ktsu.Sdk" />
<PropertyGroup>
<!-- Your project-specific properties here -->
</PropertyGroup>
</Project>
Add sdk extensions to your project (for specific project types):
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="ktsu.Sdk" />
<Sdk Name="ktsu.Sdk.ConsoleApp" />
<PropertyGroup>
<!-- Your project-specific properties here -->
</PropertyGroup>
</Project>
The SDK automatically detects different project types in your solution:
Each project type receives appropriate default settings, references, and output configurations (console apps vs. GUI apps).
The SDK creates intelligent namespaces based on your project's directory structure:
Examples:
MySolution/src/Core/Utils/MyProject.csproj
→ ProjectNamespace: src.Core.Utils.MyProject
MySolution/libs/MyLib/MyLib.csproj
→ ProjectNamespace: libs.MyLib (already ends with project name)
MySolution/MyApp/MyApp.csproj
→ ProjectNamespace: MyApp (directory equals project name)
Final Namespace Pattern:
{AuthorsNamespace}.{ProjectNamespace} where AuthorsNamespace comes from AUTHORS.md
The SDK automatically searches for solution files up the directory hierarchy:
MyProject/ ← Level 3: Check here
├── MyProject.sln ← Found! Use this directory
└── apps/ ← Level 2: Check here
└── frontend/ ← Level 1: Check here
└── src/ ← Level 0: Start here (project directory)
└── MyApp.csproj
This enables the SDK to work with any nested project structure without configuration.
This SDK supports the following metadata files at the solution root:
README.md: Project documentation (this file)AUTHORS.md: Project authors and contributorsLICENSE.md: Project license informationCHANGELOG.md: Version history and changesDESCRIPTION.md: Detailed project descriptionVERSION.md: Current version informationTAGS.md: Project tags for NuGet packagesCOPYRIGHT.md: Copyright informationAUTHORS.url: URL to authors' informationPROJECT_URL.url: URL to project informationThese files are automatically included in the NuGet package and used to populate package metadata.
Projects automatically reference the primary project and expose internals to test projects. Cross-references are intelligently configured based on project types and naming conventions.
The SDK includes comprehensive error handling to prevent common MSBuild failures:
Library projects are automatically configured for NuGet packaging with:
Projects are configured with multiple runtime identifiers:
win-x64, win-x86, win-arm64osx-x64, osx-arm64linux-x64, linux-arm64See the LICENSE.md file for license information.
Contributions are welcome! Please feel free to submit a Pull Request.