Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Microsoft Semantic kernel DotNet SDK Environment

From Leeroopedia
Knowledge Sources
Domains Infrastructure, DotNet
Last Updated 2026-02-11 20:00 GMT

Overview

.NET 10.0 SDK environment with C# 14 language support, targeting net10.0, net8.0, and netstandard2.0 for building and running the Semantic Kernel .NET SDK.

Description

This environment defines the base .NET development stack required for all Semantic Kernel .NET projects. The SDK is built against .NET 10.0 as the primary framework, with backward compatibility for .NET 8.0 (LTS) and .NET Standard 2.0. The solution uses central package management via Directory.Packages.props and enforces strict code analysis with all analyzers enabled by default. Nullable reference types are enabled across all projects, and the C# language version is set to 14 (latest).

The build system uses Release configuration by default, which also triggers dotnet format for code style enforcement. Native AOT compilation is supported for the core abstractions and core packages when targeting .NET 7.0 or later.

Usage

Use this environment for any development, building, or testing of Semantic Kernel .NET projects. This is the foundational prerequisite for all five workflows: Kernel Setup, Plugin Integration, Agent Orchestration, Process Orchestration, and Vector Store RAG Pipeline.

System Requirements

Category Requirement Notes
OS Windows, macOS, or Linux Any OS supported by .NET 10.0 SDK
.NET SDK 10.0.100 or higher Specified in global.json; rollForward set to major
.NET Runtime .NET 10.0, .NET 8.0, or .NET Standard 2.0 compatible Multi-targeting: net10.0;net8.0;netstandard2.0
C# Version 14 Set in Directory.Build.props
Disk 2GB minimum SDK installation plus NuGet package cache

Dependencies

System Packages

  • .NET SDK 10.0.100+
  • Git (for source control)

Core NuGet Packages

  • Microsoft.SemanticKernel (meta-package)
  • Microsoft.SemanticKernel.Abstractions
  • Microsoft.SemanticKernel.Core
  • Microsoft.Extensions.DependencyInjection >= 10.0.2
  • Microsoft.Extensions.Logging >= 10.0.2
  • Microsoft.Extensions.Configuration >= 10.0.2
  • System.Text.Json >= 10.0.2
  • System.Numerics.Tensors >= 10.0.2

AI Connector Packages (Optional)

  • Microsoft.SemanticKernel.Connectors.OpenAI — OpenAI and Azure OpenAI
  • Microsoft.SemanticKernel.Connectors.Google — Google Gemini
  • Microsoft.SemanticKernel.Connectors.HuggingFace — HuggingFace Inference
  • Microsoft.SemanticKernel.Connectors.MistralAI — Mistral AI
  • Microsoft.SemanticKernel.Connectors.Onnx — Local ONNX models
  • Microsoft.SemanticKernel.Connectors.Amazon — AWS Bedrock

Testing Packages

  • xunit >= 2.9.3
  • Microsoft.NET.Test.Sdk >= 18.0.1
  • Moq >= 4.18.4

Credentials

No credentials are required for the base SDK environment. AI service credentials are documented in the Environment:Microsoft_Semantic_kernel_OpenAI_API_Environment page.

Quick Install

# Install .NET 10.0 SDK
# Visit https://dotnet.microsoft.com/download/dotnet/10.0

# Create a new project with Semantic Kernel
dotnet new console -n MySkApp
cd MySkApp
dotnet add package Microsoft.SemanticKernel

# Build and run
dotnet build --configuration Release
dotnet run

Code Evidence

SDK version constraint from dotnet/global.json:

{
  "sdk": {
    "version": "10.0.100",
    "rollForward": "major",
    "allowPrerelease": false
  }
}

Target framework from dotnet/src/SemanticKernel.Core/SemanticKernel.Core.csproj:

<TargetFrameworks>net10.0;net8.0;netstandard2.0</TargetFrameworks>

AOT compatibility from dotnet/src/SemanticKernel.Core/SemanticKernel.Core.csproj:

<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>

Build script from dotnet/build.sh:

# Release config triggers also "dotnet format"
dotnet build --configuration Release --interactive
dotnet test --configuration Release --no-build --no-restore --interactive

Common Errors

Error Message Cause Solution
The current .NET SDK does not support targeting .NET 10.0 .NET SDK version too old Install .NET SDK 10.0.100 or higher
NETSDK1045: The current .NET SDK does not support 'newer version' as a target SDK rollForward misconfigured Ensure global.json has "rollForward": "major"
CS8600: Converting null literal or possible null value to non-nullable type Nullable reference types enabled Add null checks or use ? nullable annotations
SKEXP0001 warning Using experimental Semantic Kernel API Add #pragma warning disable SKEXP0001 or suppress in .csproj

Compatibility Notes

  • .NET Standard 2.0: Supported for maximum backward compatibility, but some features (AOT, newer C# syntax) are unavailable.
  • .NET 8.0 LTS: Recommended for production deployments that cannot yet adopt .NET 10.0.
  • .NET Framework 4.6.2: Only supported by the SQL Server Vector Data connector; not supported by core SDK packages.
  • Native AOT: Only SemanticKernel.Abstractions and SemanticKernel.Core are AOT-compatible. Most connectors are not yet AOT-ready.
  • Release build: Automatically runs dotnet format for code style enforcement.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment