Skip to content

Cannot create a launch.json file for a .NET 10 project #8868

@TheLeftExit

Description

@TheLeftExit

Type: Bug

Issue Description

C# Extension fails to generate a runnable launch.json file for a .NET 10 project. Instead, it exhibits the behavior identical to that reported in #4346. Looking at the code in the PR that fixed the issue, there's regex that matches .NET 6-9 - I guess the regex needs to be future-proofed further. Downgrading the project to <TargetFramework>net9.0</TargetFramework> resolves the issue and a working launch.json gets generated.

I use OSS Code with the muhammad-sammy/csharp, which is a fork with frequent updates so I assume it means the issue is reproducible in VSCode, though I could be wrong. Based on what I've found so far, this doesn't seem to be a fork issue.

Steps to Reproduce

  • Install .NET 10 and open a directory with a .NET 10 project in the root,
  • Open the Debug tab,
  • Press "Generate C# Assets for Build and Debug",
  • Press "Run and Debug",
  • In the drop-down, select ".NET 5 and .NET Core".

Expected Behavior

A runnable launch.json with a proper path and without the warning.

Actual Behavior

Incomplete launch.json that includes this warning:

            "WARNING01": "*********************************************************************************",
            "WARNING02": "The C# extension was unable to automatically decode projects in the current",
            "WARNING03": "workspace to create a runnable launch.json file. A template launch.json file has",
            "WARNING04": "been created as a placeholder.",
            "WARNING05": "",
            "WARNING06": "If the server is currently unable to load your project, you can attempt to",
            "WARNING07": "resolve this by restoring any missing project dependencies (example: run 'dotnet",
            "WARNING08": "restore') and by fixing any reported errors from building the projects in your",
            "WARNING09": "workspace.",
            "WARNING10": "If this allows the server to now load your project then --",
            "WARNING11": "  * Delete this file",
            "WARNING12": "  * Open the Visual Studio Code command palette (View->Command Palette)",
            "WARNING13": "  * run the command: '.NET: Generate Assets for Build and Debug'.",
            "WARNING14": "",
            "WARNING15": "If your project requires a more complex launch configuration, you may wish to",
            "WARNING16": "delete this configuration and pick a different template using the 'Add",
            "WARNING17": "Configuration...' button at the bottom of this file.",
            "WARNING18": "*********************************************************************************",

Extension version: 2.110.4
VS Code version: Code - OSS 1.107.0 (302ff6a2e235c95b88e587d4a4b6eeb1b6613297, 2025-12-12T19:06:53.864Z)
OS version: Linux x64 6.18.2-arch2-1
Modes:

Logs

Environment Information

VSCode version: 1.107.0
C# Extension: 2.110.4
Using OmniSharp: true

Mono Information Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable.
Dotnet Information .NET SDK: Version: 10.0.100 Commit: b0f34d51fc Workload version: 10.0.100-manifests.4eab3e0f MSBuild version: 18.0.2

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/10.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.0
Architecture: x64
Commit: b0f34d51fc

.NET SDKs installed:
10.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.NETCore.App 10.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
csharp muhammad-sammy 2.110.4 muhammad-sammy.csharp-2.110.4-universal
vscode-dotnet-runtime ms-dotnettools 2.3.7 ms-dotnettools.vscode-dotnet-runtime-2.3.7-universal
C# Settings
Setting Value
preferCSharpExtension true
compilerDiagnosticScope openFiles
analyzerDiagnosticScope openFiles
enableXamlTools true
useServerGC true
System Info
Item Value
CPUs AMD Ryzen 7 7800X3D 8-Core Processor (16 x 4363)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 1, 1, 1
Memory (System) 61.93GB (55.51GB free)
Process Argv
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE wayland

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions