Documentation
Topics Overview Overview Linux macOS Windows VS Code for the Web Raspberry Pi Network Additional Components Uninstall VS Code Tutorial Copilot Quickstart User Interface Personalize VS Code Install Extensions Tips and Tricks Intro Videos Overview Setup Quickstart Overview Language Models Context Tools Agents Customization Trust & Safety Overview Agents Tutorial Agents Window Planning Memory Tools Subagents Local Agents Copilot CLI Cloud Agents Third-Party Agents Overview Chat Sessions Add Context Inline Chat Review Edits Checkpoints Artifacts Panel Debug Chat Interactions Prompt Examples Overview Instructions Prompt Files Custom Agents Agent Skills Language Models MCP Hooks Plugins Context Engineering Customize AI Test-Driven Development Edit Notebooks with AI Test with AI Test Web Apps with Browser Tools Debug with AI MCP Dev Guide OpenTelemetry Monitoring Inline Suggestions Smart Actions Best Practices Security Troubleshooting FAQ Cheat Sheet Settings Reference MCP Configuration Workspace Context Display Language Layout Keyboard Shortcuts Settings Settings Sync Extension Marketplace Extension Runtime Security Themes Profiles Overview Voice Interactions Command Line Interface Telemetry Basic Editing IntelliSense Code Navigation Refactoring Snippets Overview Multi-Root Workspaces Workspace Trust Tasks Debugging Debug Configuration Testing Port Forwarding Integrated Browser Overview Quickstart Staging & Committing Branches & Worktrees Repositories & Remotes Merge Conflicts Collaborate on GitHub Troubleshooting FAQ Getting Started Tutorial Terminal Basics Terminal Profiles Shell Integration Appearance Advanced Overview Enterprise Policies AI Settings Extensions Telemetry Updates Overview JavaScript JSON HTML Emmet CSS, SCSS and Less TypeScript Markdown PowerShell C++ Java PHP Python Julia R Ruby Rust Go T-SQL C# .NET Swift Working with JavaScript Node.js Tutorial Node.js Debugging Deploy Node.js Apps Browser Debugging Angular Tutorial React Tutorial Vue Tutorial Debugging Recipes Performance Profiling Extensions Tutorial Transpiling Editing Refactoring Debugging Quick Start Tutorial Run Python Code Editing Linting Formatting Debugging Environments Testing Python Interactive Django Tutorial FastAPI Tutorial Flask Tutorial Create Containers Deploy Python Apps Python in the Web Settings Reference Getting Started Navigate and Edit Refactoring Formatting and Linting Project Management Build Tools Run and Debug Testing Spring Boot Modernizing Java Apps Application Servers Deploy Java Apps GUI Applications Extensions FAQ Intro Videos GCC on Linux GCC on Windows GCC on Windows Subsystem for Linux Clang on macOS Microsoft C++ on Windows Build with CMake CMake Tools on Linux CMake Quick Start C++ Dev Tools for Copilot Editing and Navigating Debugging Configure Debugging Refactoring Settings Reference Configure IntelliSense Configure IntelliSense for Cross-Compiling FAQ Intro Videos Get Started Navigate and Edit IntelliCode Refactoring Formatting and Linting Project Management Build Tools Package Management Run and Debug Testing FAQ Overview Node.js Python ASP.NET Core Debug Docker Compose Registries Deploy to Azure Choose a Dev Environment Customize Develop with Kubernetes Tips and Tricks Overview Jupyter Notebooks Data Science Tutorial Python Interactive Data Wrangler Quick Start Data Wrangler PyTorch Support Azure Machine Learning Manage Jupyter Kernels Jupyter Notebooks on the Web Data Science in Microsoft Fabric Foundry Toolkit Overview Foundry Toolkit Copilot Tools Create Agents Models Playground Agent Builder Agent Inspector Evaluation Tool Catalog Fine-Tuning (Automated Setup) Fine-Tuning (Project Template) Model Conversion Tracing Profiling (Windows ML) FAQ File Structure Manual Model Conversion Manual Model Conversion on GPU Setup Environment Without Foundry Toolkit Template Project Migrating from Visualizer to Agent Inspector Overview Getting Started Resources View Deployment VS Code for the Web - Azure Containers Azure Kubernetes Service Kubernetes MongoDB Remote Debugging for Node.js Overview SSH Dev Containers Windows Subsystem for Linux GitHub Codespaces VS Code Server Tunnels SSH Tutorial WSL Tutorial Tips and Tricks FAQ Overview Tutorial Attach to Container Create Dev Container Advanced Containers devcontainer.json Dev Container CLI Tips and Tricks FAQ Default Keyboard Shortcuts Default Settings Substitution Variables Tasks SchemaOn this page there are 10 sections
C# Dev Kit FAQ
Use this FAQ (Frequently Asked Questions) topic to learn more about the C# Dev Kit extension and troubleshoot issues you may be experiencing.
General
What is C# Dev Kit?
C# Dev Kit is an extension created to enhance your C# development experience in Visual Studio Code. It aims to bring a more expansive, productive, and reliable C# experience to VS Code. C# Dev Kit does not replace the existing C# extension but adds on top of the great language service features it provides. Developers can choose to continue using the updated version of the existing C# extension or enhance their experience by adding C# Dev Kit.
What project types are currently supported?
C# Dev Kit supports building web apps, console apps, class library projects, and test projects for .NET Core, often also called .NET. The .NET MAUI extension and the Unity extension are built on top of C# Dev Kit and provide additional support for building .NET Multi-platform App UI (MAUI) apps and Unity apps. These extensions support the modern .NET project format, also known as "sdk-style" projects. If you are building non-SDK-format projects such as .NET Framework apps and Xamarin apps, see the Project System section.
What extensions are included in C# Dev Kit?
Today the extensions included in the C# Dev Kit family are:
Use of these extensions are governed under the EULA for the C# Dev Kit family of extensions.
These extensions also have dependencies that carry their own licensing – for example, C# Dev Kit depends on the C# extension and .NET Install Tool.
Why isn't C# Dev Kit activating / C# Dev Kit commands are not found?
There are a few reasons why C# Dev Kit doesn't activate when you attempt to edit a C# file.
- version 2.0+ of the C# extension is not installed. C# Dev Kit requires version 2.0 or higher of the C# extension. Check to make sure you have the C# extension installed and that you have a version 2.0 or higher.
- workspace prefers C# extension. C# Dev Kit does not support .NET Framework projects and if you have set the dotnet.preferCSharpExtension setting to true, C# Dev Kit will be disabled for that workspace. If the project is not a .NET Framework project, make sure to disable this setting.
- using a readonly OS. C# Dev Kit requires write access to its own extension folder and to the VS Code-provided folder for extensions to write arbitrary state within the operating system, so if you are using an OS that is completely readonly, C# Dev Kit will not work.
If you have checked these and the C# Dev Kit commands are still not found, please report an issue and provide the information in the Output window for C# Dev Kit.
Licensing and Contributing
Who can use C# Dev Kit?
C# Dev Kit is available via a Community License for those who qualify and is also included as another addition to existing Visual Studio Subscriptions. This means that C# Dev Kit is available to use today for developers with active Visual Studio subscriptions.
For personal, academic, and open-source projects, C# Dev Kit can be used at no cost. For commercial purposes, teams of up to 5 can also use the C# Dev Kit at no cost. For 6+ developers, those users will need a Visual Studio Professional (or higher) subscription. C# Dev Kit is also included in GitHub Codespaces and Microsoft Dev Box, so users of those products have access to C# Dev Kit at no additional charge.
Where do I submit feedback and suggestions?
Users can report an issue or a suggestion through VS Code's Help > Report Issue. Select whether it is a bug, feature request, or performance issue, file on An extension, and select C# Dev Kit from the list of extensions.
Is C# Dev Kit open source? Why not?
No. C# Dev Kit is closed source but depends upon the C# for VS Code extension, which is open source, and both communicate with open-source components such as Roslyn and Razor. One of our goals with C# Dev Kit is to provide an improved productivity experience for C# developers who use VS Code. To achieve this, C# Dev Kit includes some proprietary, closed-source features that are shared with our other tools. To make these experiences available to VS Code users, we needed to introduce C# Dev Kit as a closed source extension.
How can I contribute?
The C# extension, which is a part of the C# Dev Kit, is fully open source and is subject to these license terms. The source code to this extension is available on https://github.com/dotnet/vscode-csharp and licensed under the MIT license.
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct. By signing the CLA, the community is free to use your contribution to .NET Foundation projects.
.NET SDK
Install script timed out
Note that, depending on your network speed, installing the .NET Core runtime might take some time. By default, the installation terminates unsuccessfully if it takes longer than 4.5 minutes to finish. If you believe this is too little (or too much) time to allow for the download, you can change the timeout value by setting dotnetAcquisitionExtension.installTimeoutValue to a custom value.
Learn more about configuring VS Code settings and see below for an example of a custom timeout in a settings.json file. In this example, the custom timeout value is 180 seconds, or 3 minutes:
{ "dotnetAcquisitionExtension.existingDotnetPath": [ { "extensionId": "msazuretools.azurerm-vscode-tools", "path": "C:\\Program Files\\dotnet\\dotnet.exe" } ] }macOS
{ "dotnetAcquisitionExtension.proxyUrl": "https://your_proxy_url:port" }Project System
The Solution Explorer reports that my project is not supported in C# Dev Kit
This is usually because the project targets .NET Framework rather than .NET Core/.NET. At this time, C# Dev Kit does not support .NET Framework projects.
To resolve this issue, you have two options.
You can update your project to an SDK-style project to access all available C# Dev Kit features.
Alternatively, you can delegate project and solution load to the C# extension, using the Prefer CSharp Extension workspace setting in the Settings editor. Keep in mind that some C# Dev Kit features will not be available with this setting. To access this setting, go to the Settings editor and select the Workspace tab. Then, search for "Prefer CSharp" in the search bar and check the box next to the Prefer CSharp Extension setting. If you're trying to load a .NET Framework project, C# Dev Kit will automatically display a notification asking you to either update your project to an SDK-style project or have the C# extension load your project or solution by selecting Use C# Extension from the notification. This option will automatically select the Prefer CSharp Extension setting. Note that you'll need to reload VS Code for this setting to take effect.
I clicked on the "Create .NET Project" button and nothing happened
This usually occurs when there is an extension version mismatch. C# Dev Kit requires version 2.0 or greater of the C# extension. If you are on v1 of the C# extension, C# Dev Kit, and the C# Dev Kit related commands will not work properly. To fix this, upgrade the C# extension to the latest version.
The Project System reports that it ran into a problem
When an internal Project System error occurs, you'll generally see a notification like this pop up in a corner of VS Code:
Select the Open log button to open a view showing a stack trace of where the problem occurred. Select and copy all the text in the log. Report the issue through VS Code and make sure to include the copied text from the log.
When I open my solution, I get the notification "Failed to restore solution"
Select Show error. This opens the Output panel for NuGet. Read through the error to determine why the package restore was unable to complete. If you are unable to resolve the problem, report the issue through VS Code.
The Solution Explorer displays "A compatible .NET SDK was not found"
The most likely cause of this error is a global.json file that specifies a different SDK than what is installed on the system.
Open the Output window and switch to the Projects pane to look for more information. You should see something like this:
To fix the issue, either update the global.json to specify an installed SDK or install the specified SDK from the Download .NET page.
Next, close and reopen the workspace.
It is also possible that the SDK is not installed in a location known to C# Dev Kit. This can happen, for example, if the SDK was installed by a package manager rather than through the Microsoft-provided installers. To fix this, uninstall the SDK via the package manager, and then install it via Download .NET.
Test Explorer
Why don't my tests appear in the Test Explorer panel?
Make sure your solution includes a test project. Only test projects that are part of the opened solution will be included. To see if the test project is part of the solution, open the Solution Explorer view in the File Explorer and see if the project appears in the tree. Right-click on the solution node to add existing test projects, or to create a new test project in the solution.
C# Dev Kit also requires that it has built your project successfully before tests appear in the Test Explorer panel. Also, if a Clean is done on your project/solution, the test dlls are removed from the Test Explorer panel.
Once you have validated that your test project is part of the solution, build your solution by right-clicking on the solution in the Solution Explorer and select Build or use ⇧⌘B (Windows, Linux Ctrl+Shift+B). Once the build has been completed, your tests will appear in the Test Explorer panel.
If your tests are still not appearing, consider the following additional checks:
- Supported .NET Core SDK: Ensure you are using a supported .NET Core SDK for your platform and machine. Some SDKs do not work on specific operating systems or architectures. For more information, check the official .NET download page: https://dotnet.microsoft.com/en-us/download.
- Valid SDK installation: Verify that a valid SDK installation is detected. You can enable diagnostic logging to check which SDK is detected for your .NET project. Note that .NET SDKs installed via unsupported tools like ASDF or Mise may not be detected, as they deviate from Microsoft’s official installation methods. We recommend following the official instructions.
- Build output: Confirm that the build is complete and has generated the corresponding output binaries, such as .dll or .exe files.
- Project loading: Ensure all projects have finished loading. In the Solution Explorer, look for a test icon next to test projects to confirm they are detected.
My tests appear in the Test Explorer panel, but I cannot debug them
Make sure that your tests are targeting NET Core. C# Dev Kit does not support .NET Framework projects, although .NET Framework projects may load and appear to work. The debugger in VS Code does not support .NET Framework.
I just added new tests to my test project, and they are not appearing in the Test Explorer panel?
C# Dev Kit requires that it has built your project successfully before tests will appear in the Test Explorer panel.
Build your solution by right-clicking on the solution in the Solution Explorer and select Build or ⇧⌘B (Windows, Linux Ctrl+Shift+B). Once the build has been completed, your tests will appear in the Test Explorer panel.
How do I collect logs for troubleshooting issues with Test Explorer?
If you are encountering issues with Test Explorer, you can enable diagnostic logging to gather more information for troubleshooting:
- Increase Test Explorer verbosity: Navigate to the C# Dev Kit settings and increase the Test Explorer Verbosity setting from minimal to diagnostic. This will generate more detailed logs.
- Check the Output Window: Open the Output window in Visual Studio Code, and select C# Dev Kit - Test Explorer from the dropdown. Diagnostic messages will appear with a [dev] prefix.
- Collect the following information:
When reporting an issue, ensure you include:
- The diagnostic logs from the Output window.
- Your operating system and version (for example, Windows 10, macOS 13).
- The version of the C# Dev Kit extension you are using. Go to the Extensions view, and hover over the extension to view the version information.
This information will help in diagnosing and resolving the issue more efficiently.
Debugger
When I F5, nothing happens
Make sure you have a C# project open or that the active document is a .cs or .razor file. If the debugger still fails to load, make sure that both the C# Dev Kit and the C# extensions have been activated.
When I F5, it asks me to "Select a Debugger". How do I know which one to pick?
If you're trying to debug .NET Console Applications, Blazor Server Apps, Blazor WebAssembly, or Web Applications, make sure to select the C# option. The other options may be part of other extensions such as Node for JavaScript debugging or Python for Python debugging, and are not part of C# Dev Kit.
When I F5, it prompts me to input a password (macOS only)
macOS has Developer Mode disabled by default and prompts a password to protect the user if a program wants to be used as a debugger.
If you wish to disable these prompts, you can run the following commands:
- DevToolsSecurity --enable
- sudo dscl . append /Groups/_developer GroupMembership $USER
Why is debugging not working?
If you're trying to debug a library or a test project, it's likely that you'll need to take some extra steps to ensure that your code is properly debugged. To debug a library, you can create a console or web application that interacts with the library. For a test project, you can use the Test Explorer to debug your code effectively.
While debugging, my breakpoints aren't binding
The process you're debugging is not built in Debug, make sure to build as debugging before debugging the process.
C# Editor
How do I get IntelliSense to work correctly?
Make sure that you have a project or solution open. If you have multiple solutions, the extension will automatically open one or prompt you to open one. Next, search for "Trace" in the Settings search bar, and set the Dotnet > Server: to Trace from the drop-down. This option provides more output information to help the developer team diagnose the issue.
Once you've made this change, reload the window by opening the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)), then typing "Reload Window" and pressing Enter. After reloading the window, check the project log in the Output panel (⇧⌘U (Windows Ctrl+Shift+U, Linux Ctrl+K Ctrl+H)) and selecting Projects from the drop-down. This will show any errors related to your project not being fully loaded. Copy all the text in the Output panel and report the issue through VS Code, making sure to include the copied text.
C# extension fails to launch the server
As a workaround, you can point the .NET runtime acquisition extension to an existing .NET 7 install with the dotnetAcquisitionExtension.existingDotnetPath setting: