-
Notifications
You must be signed in to change notification settings - Fork 37.5k
Closed
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version:
- OS Version:
Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.98.2 and also tested with 1.97.2
- OS Version: macOS (version unknown, e.g., macOS Sequoia 15)
Steps to Reproduce:
- Install VS Code on macOS (e.g., version 1.98.2).
- Install the .NET 9.0 preview SDK .
- Open VS Code and install the C# extension (
ms-dotnettools.csharp) & C# Dev kit. - Open a .NET project targeting
net9.0(e.g., a project with<TargetFramework>net9.0</TargetFramework>in the.csprojfile). - Observe the error:
Unable to read file '/Users/<username>/.vscode/extensions/ms-dotnettools.csdevkit-1.16.6-darwin-arm64/package.json' (Error: Unable to resolve nonexistent file ...).
Additional Details
- Behavior: The error occurs when the C# extension attempts to load its dependency
ms-dotnettools.csdevkit. Thepackage.jsonfile for this extension is missing, suggesting a failed or corrupted installation of the dependency. - Attempts to Fix:
- Reinstalled VS Code multiple times, including clearing all user data (
~/Library/Application Support/Code,~/.vscode, and cache directories). - Tried older versions of VS Code (e.g., 1.97.2 and 1.98.2), but the issue persists.
- Deleted the problematic extension folder (
~/.vscode/extensions/ms-dotnettools.csdevkit-1.16.6-darwin-arm64) and reinstalled the C# extension, but the error reoccurs.
- Reinstalled VS Code multiple times, including clearing all user data (
- Extension Bisect: Using "Help: Start Extension Bisect" confirmed that the issue is caused by the C# extension (
ms-dotnettools.csharp), as the error does not occur when this extension is disabled. - Environment:
- macOS architecture: ARM64 M2
- .NET SDK versions installed: 9.0.100-preview.x
Expected Behavior
The C# extension and its dependencies (e.g., ms-dotnettools.csdevkit) should install correctly and load without errors, even when using a preview version of the .NET SDK like .NET 9.0.
Actual Behavior
VS Code displays the error Unable to read file ... package.json for the ms-dotnettools.csdevkit extension, preventing the C# extension from functioning properly. Features like IntelliSense and debugging may not
additional note
VS Code current version on my windows machine works fine.
Metadata
Metadata
Assignees
Labels
No labels