{"record":{"id":"c804b9e5a4e6231a","repo":"microsoft/aspire","slug":"polyglot-skeleton-not-yet-supported-for-language-languageid","errorCode":null,"errorMessage":"Polyglot skeleton not yet supported for language: {languageId}","messagePattern":"Polyglot skeleton not yet supported for language: (.+?)","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Cli/Commands/InitCommand.cs","lineNumber":491,"sourceCode":"                    options: new ProcessInvocationOptions(),\n                    cancellationToken: cancellationToken);\n            });\n\n        if (result != 0)\n        {\n            InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FailedToCreateAppHostFromTemplate, result));\n            return CliExitCodes.FailedToCreateNewProject;\n        }\n\n        InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.CreatedFile, $\"{appHostDirName}/\"));\n\n        return CliExitCodes.Success;\n    }\n\n    private async Task<int> DropPolyglotSkeletonAsync(string languageId, DirectoryInfo workingDirectory, CancellationToken cancellationToken)\n    {\n        var language = _languageDiscovery.GetLanguageById(languageId)\n            ?? throw new NotSupportedException($\"Polyglot skeleton not yet supported for language: {languageId}\");\n\n        var existingAppHostFileName = language.DetectionPatterns\n            .Where(pattern => !pattern.Contains('*', StringComparison.Ordinal))\n            .FirstOrDefault(pattern => File.Exists(Path.Combine(workingDirectory.FullName, pattern)));\n        if (existingAppHostFileName is not null)\n        {\n            InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FileAlreadyExistsSkipping, existingAppHostFileName));\n            return CliExitCodes.Success;\n        }\n\n        var appHostPath = ScaffoldingService.GetAppHostPath(workingDirectory, language);\n        var displayPath = PathNormalizer.NormalizePathForStorage(Path.GetRelativePath(workingDirectory.FullName, appHostPath));\n        if (File.Exists(appHostPath))\n        {\n            InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FileAlreadyExistsSkipping, displayPath));\n            return CliExitCodes.Success;\n        }\n","sourceCodeStart":473,"sourceCodeEnd":509,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Cli/Commands/InitCommand.cs#L473-L509","documentation":"'aspire init --language <id>' drops a polyglot skeleton per language, but only languages the CLI can discover support it. DropPolyglotSkeletonAsync throws NotSupportedException when the language id is not registered with the language discovery service.","triggerScenarios":"Running 'aspire init' (polyglot mode) with a --language value that GetLanguageById cannot resolve — an unsupported/unknown language id or one not yet implemented for skeletons.","commonSituations":"Passing an id the CLI does not recognize (e.g. a niche language or misspelled id like 'py' instead of 'python', depending on supported ids); using a newer language before the CLI supports it.","solutions":["Run the language list (e.g. 'aspire init --help' or the language discovery output) and use a supported language id","Correct the language id spelling","Update the Aspire CLI to a version that supports the desired language"],"exampleFix":"// before\naspire init --language cpp\n// after\naspire init --language csharp  // use a supported language id from 'aspire init --help'","handlingStrategy":"validation","validationCode":"var supported = languageDiscovery.GetSupportedLanguageIds();\nif (!supported.Contains(languageId))\n{\n    Console.Error.WriteLine($\"Unsupported language '{languageId}'. Supported: {string.Join(\", \", supported)}\");\n    return 1;\n}","typeGuard":"bool isSupported = languageDiscovery.GetLanguageById(languageId) is not null;","tryCatchPattern":"try\n{\n    exitCode = await command.RunAsync(...);\n}\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"Polyglot skeleton not yet supported\"))\n{\n    Console.Error.WriteLine(ex.Message + \" Use a supported language id.\");\n    exitCode = 1;\n}","preventionTips":["List supported language ids with 'aspire init --help' before scripting","Copy language ids exactly (avoid abbreviations)","Keep the CLI updated for new language support"],"tags":["cli","aspire","polyglot","language"],"backgroundTag":"unsupported-operation","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}