{"record":{"id":"a070ee8b4ee2924e","repo":"clockworklabs/SpacetimeDB","slug":"unsupported-net-sdk-version-spacetimedb-requ","errorCode":null,"errorMessage":"Unsupported .NET SDK version: {}. SpacetimeDB requires .NET SDK 8.0 or 10.0.\nIf you have multiple versions installed, configure your project using https://learn.microsoft.com/en-us/dotnet/core/tools/global-json, or use --dotnet-version to specify the target version explicitly.","messagePattern":"Unsupported \\.NET SDK version: (.+?)\\. SpacetimeDB requires \\.NET SDK 8\\.0 or 10\\.0\\.\nIf you have multiple versions installed, configure your project using https://learn\\.microsoft\\.com/en-us/dotnet/core/tools/global-json, or use --dotnet-version to specify the target version explicitly\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/tasks/csharp.rs","lineNumber":244,"sourceCode":"    let build_path = match (dotnet_major, native_aot_flag) {\n        // .NET 10: always use NativeAOT-LLVM, no flag needed.\n        (Some(10), _) => {\n            if native_aot_flag {\n                println!(\"Note: --native-aot is not needed with .NET 10 (NativeAOT-LLVM is used automatically).\");\n            }\n            CsharpBuildPath::Net10Aot\n        }\n        // .NET 8 with --native-aot: use NativeAOT-LLVM with .NET 8 ILCompiler packages.\n        (Some(8), true) => CsharpBuildPath::Net8Aot,\n        // .NET 8 without flag: use the existing wasi-experimental JIT path.\n        (Some(8), false) => CsharpBuildPath::Net8Jit,\n        // Unsupported version.\n        _ => {\n            let selected_version = dotnet_major\n                .map(|v| v.to_string())\n                .or_else(|| dotnet_version_str.clone())\n                .unwrap_or_else(|| \"<unknown>\".to_string());\n            anyhow::bail!(\n                \"Unsupported .NET SDK version: {}. SpacetimeDB requires .NET SDK 8.0 or 10.0.\\n\\\n                 If you have multiple versions installed, configure your project using \\\n                 https://learn.microsoft.com/en-us/dotnet/core/tools/global-json, \\\n                 or use --dotnet-version to specify the target version explicitly.\",\n                selected_version\n            );\n        }\n    };\n\n    let desired_sdk_major = match build_path {\n        CsharpBuildPath::Net8Jit | CsharpBuildPath::Net8Aot => 8,\n        CsharpBuildPath::Net10Aot => 10,\n    };\n    let active_sdk_major = dotnet_version_str.as_deref().and_then(parse_major_version);\n    if active_sdk_major != Some(desired_sdk_major) {\n        let active = dotnet_version_str.as_deref().map(str::trim).unwrap_or(\"<unknown>\");\n        anyhow::bail!(\n            \"The selected C# build path requires the .NET {desired_sdk_major} SDK, but the active SDK is .NET {active}.\\n\\","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/tasks/csharp.rs#L226-L262","documentation":"Error \"Unsupported .NET SDK version: {}. SpacetimeDB requires .NET SDK 8.0 or 10.0.\nIf you have multiple versions installed, configure your project using https://learn.microsoft.com/en-us/dotnet/core/tools/global-json, or use --dotnet-version to specify the target version explicitly.\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/cli/src/tasks/csharp.rs:244 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}