CINXE.COM

C# Dev Kit extension FAQ

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="awa-expId" content="vscw_aaflight1016_control:103441;" /> <meta name="awa-env" content="prod" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="google-site-verification" content="hNs7DXrTySP_X-0P_AC0WulAXvUwgSXEmgfcO2r79dw" /> <!-- Twitter and Facebook OpenGraph Metadata--> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@code" /> <meta name="description" content="C# Dev Kit extension Frequently Asked Questions (FAQ)" /> <meta name="keywords" content="" /> <meta name="ms.prod" content="vs-code" /> <meta name="ms.TOCTitle" content="FAQ" /> <meta name="ms.ContentId" content="edd2c270-152c-419d-b5d9-06f2f95979cd" /> <meta name="ms.date" content="5/3/2024" /> <meta name="ms.topic" content="conceptual" /> <!-- Twitter and Facebook OpenGraph Metadata--> <meta name="twitter:card" content="summary_large_image" /> <meta property="og:url" content="https://code.visualstudio.com/docs/csharp/cs-dev-kit-faq" /> <meta property="og:type" content="article" /> <meta property="og:title" content="C# Dev Kit extension FAQ" /> <meta property="og:description" content="C# Dev Kit extension Frequently Asked Questions (FAQ)" /> <meta property="og:image" content="https://code.visualstudio.com/opengraphimg/opengraph-docs.png" /> <link rel="shortcut icon" href="/favicon.ico" sizes="128x128" /> <link rel="apple-touch-icon" href="/apple-touch-icon.png"> <title>C# Dev Kit extension FAQ</title> <link rel="stylesheet" href="/vendor/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="/dist/v2/style.css"> <script src="https://consentdeliveryfd.azurefd.net/mscc/lib/v2/wcp-consent.js"></script> <script type="text/javascript" src="https://js.monitor.azure.com/scripts/c/ms.analytics-web-4.min.js"></script> <script type="text/javascript"> // Leave as var; siteConsent is initialized and referenced elsewhere. var siteConsent = null; const GPC_DataSharingOptIn = false; WcpConsent.onInitCallback(function () { window.appInsights = new oneDS.ApplicationInsights(); window.appInsights.initialize({ instrumentationKey: "1a3eb3104447440391ad5f2a6ee06a0a-62879566-bc58-4741-9650-302bf2af703f-7103", propertyConfiguration: { userConsented: false, gpcDataSharingOptIn: false, callback: { userConsentDetails: siteConsent ? siteConsent.getConsent : undefined }, }, cookieCfg: { ignoreCookies: ["MSCC"] }, webAnalyticsConfiguration:{ // Web Analytics Plugin configuration urlCollectQuery: true, urlCollectHash: true, autoCapture: { scroll: true, pageView: true, onLoad: true, onUnload: true, click: true, resize: true, jsError: true } } }, []); window.appInsights.getPropertyManager().getPropertiesContext().web.gpcDataSharingOptIn = GPC_DataSharingOptIn; }); </script> <link rel="alternate" type="application/atom+xml" title="RSS Feed for code.visualstudio.com" href="/feed.xml" /> </head> <body > <!-- Setting theme here to avoid FOUC --> <script> function setTheme(themeName) { if (themeName === 'dark') { document.documentElement.removeAttribute('data-theme'); // dark is default, so no data-theme attribute needed } if (themeName === 'light') { document.documentElement.setAttribute('data-theme', themeName); } return; } // Determine initial theme: user preference or system preference let theme = localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); setTheme(theme); // Apply the initial theme // Listen for changes in the system theme preference window.matchMedia('(prefers-color-scheme: dark)').addListener(e => { if (!localStorage.getItem('theme')) { // Only if no user preference is saved setTheme(e.matches ? 'dark' : 'light'); } }); </script> <div id="main"> <div class="navbar-fixed-container"> <div class="navbar navbar-inverse navbar-fixed-top " data-spy="affix" data-offset-top="1"> <div id='cookie-banner'></div> <nav role="navigation" aria-label="Top Level"> <div class="container"> <div class="nav navbar-header"> <a class="navbar-brand" href="/"><span>Visual Studio Code</span></a> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" aria-label="Expand and Collapse Menu"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-left"> <li class="active" ><a id="nav-docs" href="/docs">Docs</a></li> <li ><a id="nav-updates" href="/updates">Updates</a></li> <li ><a id="nav-blogs" href="/blogs">Blog</a></li> <li ><a id="nav-extend" href="/api">API</a></li> <li><a href="https://marketplace.visualstudio.com/VSCode" target="_blank" rel="noopener" id="nav-extensions">Extensions</a></li> <li ><a id="nav-faqs" href="/docs/supporting/faq">FAQ</a></li> <li class='search visible-xs visible-sm' ><a href="/Search">Search</a></li> <li ><a id="nav-copilot" href="/docs/copilot/overview">GitHub Copilot</a></li> </ul> </ul> <ul class="nav navbar-nav navbar-right" role="presentation"> <li> <button type="button" class="theme-switch" id="theme-toggle"> <img class="theme-icon-light" src="/assets/icons/theme-light.svg" alt="Switch to the dark theme" /> <img class="theme-icon-dark" src="/assets/icons/theme-dark.svg" alt="Switch to the light theme" /> </button> </li> <li> <a href="/Search" title="Search" class="btn search-btn" id="nav-search"> <img class="search-icon-light" src="/assets/icons/search.svg" width="16px" height="16px" alt="Search" /> <img class="search-icon-dark" src="/assets/icons/search-dark.svg" width="16px" height="16px" alt="Search" /> </a> </li> <li class="search" role="presentation"> <form class="nav-search search-form" role="search" aria-label="Search"> <div class="input-group" role="presentation"> <input type="text" name="q" class="search-box form-control" placeholder="Search Docs" aria-label="Search text"/> <span class="input-group-btn"> <button tabindex="0" class="btn" type="submit" aria-label="Search"> <img class="search-icon-dark" src="/assets/icons/search-dark.svg" alt="Search" /> <img class="search-icon-light" src="/assets/icons/search.svg" alt="Search" /> </button> </span> </div> </form> </li> <!-- this was hiden in the home and download page, keeping it for now --> <li><a class="link-button" href="/Download" id="nav-download"> <span>Download</span></a></li> </ul> </div> </div> </nav> </div> </div> <div class="updates-banner "> <div class="container"> <p class="message"><a href="/updates" id="banner-link-updates">Version 1.95</a> is now available! Read about the new features and fixes from October.</p> </div> <div tabindex="0" role="button" title="Dismiss this update" class="dismiss-btn" id="banner-dismiss-btn"><span class="sr-only">Dismiss this update</span><span aria-hidden="true" class="glyph-icon"></span></div> </div> <!-- This div wraps around the entire site --> <!-- The body itself should already have a main tag --> <div id="main-content"> <script> function closeReportIssue() { var element = document.getElementById('surveypopup'); element.parentElement.removeChild(element); } function reportIssue(tutorial, page) { var div = document.createElement('div'); div.innerHTML = '<div id="surveypopup" class="overlay visible"><div class="surveypopup"><div id="surveytitle">Tell us more<a href="javascript:void(0)" onclick="closeReportIssue()">X</a></div><div id="surveydiv"><iframe frameBorder="0" scrolling="0" src="https://www.research.net/r/PWZWZ52?tutorial=' + tutorial + '&step=' + page + '"></iframe></div></div></div>'; document.body.appendChild(div.children[0]); } </script> <div class="container body-content docs"> <div class="row"> <!-- left nav --> <div class="col-xs-12 col-md-2 docs-navbar-container"> <nav id="docs-navbar" aria-label="Topics" class="docs-nav visible-md visible-lg"> <ul class="nav" id="main-nav"> <li > <a class="docs-home" href="/docs" >Overview</a> </li> <li class="panel collapsed"> <a class="area" role="button" href="#setup-articles" data-parent="#main-nav" data-toggle="collapse">Setup</a> <ul id="setup-articles" class="collapse "> <li > <a href="/docs/setup/setup-overview" >Overview</a> </li> <li > <a href="/docs/setup/linux" >Linux</a> </li> <li > <a href="/docs/setup/mac" >macOS</a> </li> <li > <a href="/docs/setup/windows" >Windows</a> </li> <li > <a href="/docs/setup/raspberry-pi" >Raspberry Pi</a> </li> <li > <a href="/docs/setup/network" >Network</a> </li> <li > <a href="/docs/setup/additional-components" >Additional Components</a> </li> <li > <a href="/docs/setup/enterprise" >Enterprise</a> </li> <li > <a href="/docs/setup/uninstall" >Uninstall</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#getstarted-articles" data-parent="#main-nav" data-toggle="collapse">Get Started</a> <ul id="getstarted-articles" class="collapse "> <li > <a href="/docs/getstarted/getting-started" >Tutorial</a> </li> <li > <a href="/docs/getstarted/introvideos" >Intro Videos</a> </li> <li > <a href="/docs/getstarted/tips-and-tricks" >Tips and Tricks</a> </li> <li > <a href="/docs/getstarted/userinterface" >User Interface</a> </li> <li > <a href="/docs/getstarted/themes" >Themes</a> </li> <li > <a href="/docs/getstarted/settings" >Settings</a> </li> <li > <a href="/docs/getstarted/keybindings" >Key Bindings</a> </li> <li > <a href="/docs/getstarted/locales" >Display Language</a> </li> <li > <a href="/docs/getstarted/telemetry" >Telemetry</a> </li> <li > <a href="/docs/getstarted/educators-and-students" >Educators & Students</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#editor-articles" data-parent="#main-nav" data-toggle="collapse">User Guide</a> <ul id="editor-articles" class="collapse "> <li > <a href="/docs/editor/codebasics" >Basic Editing</a> </li> <li > <a href="/docs/editor/extension-marketplace" >Extension Marketplace</a> </li> <li > <a href="/docs/editor/intellisense" >IntelliSense</a> </li> <li > <a href="/docs/editor/editingevolved" >Code Navigation</a> </li> <li > <a href="/docs/editor/refactoring" >Refactoring</a> </li> <li > <a href="/docs/editor/debugging" >Debugging</a> </li> <li > <a href="/docs/editor/testing" >Testing</a> </li> <li > <a href="/docs/editor/vscode-web" >VS Code for the Web</a> </li> <li > <a href="/docs/editor/tasks" >Tasks</a> </li> <li > <a href="/docs/editor/profiles" >Profiles</a> </li> <li > <a href="/docs/editor/settings-sync" >Settings Sync</a> </li> <li > <a href="/docs/editor/userdefinedsnippets" >Snippets</a> </li> <li > <a href="/docs/editor/emmet" >Emmet</a> </li> <li > <a href="/docs/editor/command-line" >Command Line Interface</a> </li> <li > <a href="/docs/editor/workspaces" >Workspaces</a> </li> <li > <a href="/docs/editor/workspace-trust" >Workspace Trust</a> </li> <li > <a href="/docs/editor/multi-root-workspaces" >Multi-root Workspaces</a> </li> <li > <a href="/docs/editor/accessibility" >Accessibility</a> </li> <li > <a href="/docs/editor/voice" >Voice Interactions</a> </li> <li > <a href="/docs/editor/custom-layout" >Custom Layout</a> </li> <li > <a href="/docs/editor/port-forwarding" >Port Forwarding</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#sourcecontrol-articles" data-parent="#main-nav" data-toggle="collapse">Source Control</a> <ul id="sourcecontrol-articles" class="collapse "> <li > <a href="/docs/sourcecontrol/overview" >Overview</a> </li> <li > <a href="/docs/sourcecontrol/intro-to-git" >Introduction to Git</a> </li> <li > <a href="/docs/sourcecontrol/github" >Collaborate on GitHub</a> </li> <li > <a href="/docs/sourcecontrol/faq" >FAQ</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#terminal-articles" data-parent="#main-nav" data-toggle="collapse">Terminal</a> <ul id="terminal-articles" class="collapse "> <li > <a href="/docs/terminal/getting-started" >Getting Started Tutorial</a> </li> <li > <a href="/docs/terminal/basics" >Terminal Basics</a> </li> <li > <a href="/docs/terminal/profiles" >Terminal Profiles</a> </li> <li > <a href="/docs/terminal/shell-integration" >Shell Integration</a> </li> <li > <a href="/docs/terminal/appearance" >Appearance</a> </li> <li > <a href="/docs/terminal/advanced" >Advanced</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#copilot-articles" data-parent="#main-nav" data-toggle="collapse">GitHub Copilot</a> <ul id="copilot-articles" class="collapse "> <li > <a href="/docs/copilot/overview" >Overview</a> </li> <li > <a href="/docs/copilot/copilot-vscode-features" >Copilot Cheat Sheet</a> </li> <li > <a href="/docs/copilot/setup" >Setup</a> </li> <li > <a href="/docs/copilot/getting-started" >Quickstart</a> </li> <li > <a href="/docs/copilot/ai-powered-suggestions" >Code Completions</a> </li> <li > <a href="/docs/copilot/copilot-chat" >Copilot Chat</a> </li> <li > <a href="/docs/copilot/getting-started-chat" >Copilot Chat Tutorial</a> </li> <li > <a href="/docs/copilot/copilot-edits" >Copilot Edits</a> </li> <li > <a href="/docs/copilot/prompt-crafting" >Best Practices</a> </li> <li > <a href="/docs/copilot/workspace-context" >Workspace Context</a> </li> <li > <a href="/docs/copilot/copilot-customization" >Customizing Copilot</a> </li> <li > <a href="/docs/copilot/copilot-extensibility-overview" >Copilot Extensibility</a> </li> <li > <a href="/docs/copilot/copilot-settings" >Settings Reference</a> </li> <li > <a href="/docs/copilot/faq" >FAQ</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#languages-articles" data-parent="#main-nav" data-toggle="collapse">Languages</a> <ul id="languages-articles" class="collapse "> <li > <a href="/docs/languages/overview" >Overview</a> </li> <li > <a href="/docs/languages/javascript" >JavaScript</a> </li> <li > <a href="/docs/languages/json" >JSON</a> </li> <li > <a href="/docs/languages/html" >HTML</a> </li> <li > <a href="/docs/languages/css" >CSS, SCSS and Less</a> </li> <li > <a href="/docs/languages/typescript" >TypeScript</a> </li> <li > <a href="/docs/languages/markdown" >Markdown</a> </li> <li > <a href="/docs/languages/powershell" >PowerShell</a> </li> <li > <a href="/docs/languages/cpp" >C++</a> </li> <li > <a href="/docs/languages/java" >Java</a> </li> <li > <a href="/docs/languages/php" >PHP</a> </li> <li > <a href="/docs/languages/python" >Python</a> </li> <li > <a href="/docs/languages/julia" >Julia</a> </li> <li > <a href="/docs/languages/r" >R</a> </li> <li > <a href="/docs/languages/ruby" >Ruby</a> </li> <li > <a href="/docs/languages/rust" >Rust</a> </li> <li > <a href="/docs/languages/go" >Go</a> </li> <li > <a href="/docs/languages/tsql" >T-SQL</a> </li> <li > <a href="/docs/languages/csharp" >C#</a> </li> <li > <a href="/docs/languages/dotnet" >.NET</a> </li> <li > <a href="/docs/languages/polyglot" >Polyglot</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#nodejs-articles" data-parent="#main-nav" data-toggle="collapse">Node.js / JavaScript</a> <ul id="nodejs-articles" class="collapse "> <li > <a href="/docs/nodejs/working-with-javascript" >Working with JavaScript</a> </li> <li > <a href="/docs/nodejs/nodejs-tutorial" >Node.js Tutorial</a> </li> <li > <a href="/docs/nodejs/nodejs-debugging" >Node.js Debugging</a> </li> <li > <a href="/docs/nodejs/nodejs-deployment" >Deploy Node.js Apps</a> </li> <li > <a href="/docs/nodejs/browser-debugging" >Browser Debugging</a> </li> <li > <a href="/docs/nodejs/angular-tutorial" >Angular Tutorial</a> </li> <li > <a href="/docs/nodejs/reactjs-tutorial" >React Tutorial</a> </li> <li > <a href="/docs/nodejs/vuejs-tutorial" >Vue Tutorial</a> </li> <li > <a href="/docs/nodejs/debugging-recipes" >Debugging Recipes</a> </li> <li > <a href="/docs/nodejs/profiling" >Performance Profiling</a> </li> <li > <a href="/docs/nodejs/extensions" >Extensions</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#typescript-articles" data-parent="#main-nav" data-toggle="collapse">TypeScript</a> <ul id="typescript-articles" class="collapse "> <li > <a href="/docs/typescript/typescript-tutorial" >Tutorial</a> </li> <li > <a href="/docs/typescript/typescript-compiling" >Compiling</a> </li> <li > <a href="/docs/typescript/typescript-editing" >Editing</a> </li> <li > <a href="/docs/typescript/typescript-refactoring" >Refactoring</a> </li> <li > <a href="/docs/typescript/typescript-debugging" >Debugging</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#python-articles" data-parent="#main-nav" data-toggle="collapse">Python</a> <ul id="python-articles" class="collapse "> <li > <a href="/docs/python/python-quick-start" >Quick Start</a> </li> <li > <a href="/docs/python/python-tutorial" >Tutorial</a> </li> <li > <a href="/docs/python/run" >Run Python Code</a> </li> <li > <a href="/docs/python/editing" >Editing Code</a> </li> <li > <a href="/docs/python/linting" >Linting</a> </li> <li > <a href="/docs/python/formatting" >Formatting</a> </li> <li > <a href="/docs/python/debugging" >Debugging</a> </li> <li > <a href="/docs/python/environments" >Environments</a> </li> <li > <a href="/docs/python/testing" >Testing</a> </li> <li > <a href="/docs/python/jupyter-support-py" >Python Interactive</a> </li> <li > <a href="/docs/python/tutorial-django" >Django Tutorial</a> </li> <li > <a href="/docs/python/tutorial-fastapi" >FastAPI Tutorial</a> </li> <li > <a href="/docs/python/tutorial-flask" >Flask Tutorial</a> </li> <li > <a href="/docs/python/tutorial-create-containers" >Create containers</a> </li> <li > <a href="/docs/python/python-on-azure" >Deploy Python Apps</a> </li> <li > <a href="/docs/python/python-web" >Python in the Web</a> </li> <li > <a href="/docs/python/settings-reference" >Settings Reference</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#java-articles" data-parent="#main-nav" data-toggle="collapse">Java</a> <ul id="java-articles" class="collapse "> <li > <a href="/docs/java/java-tutorial" >Getting Started</a> </li> <li > <a href="/docs/java/java-editing" >Navigate and Edit</a> </li> <li > <a href="/docs/java/java-refactoring" >Refactoring</a> </li> <li > <a href="/docs/java/java-linting" >Formatting and Linting</a> </li> <li > <a href="/docs/java/java-project" >Project Management</a> </li> <li > <a href="/docs/java/java-build" >Build Tools</a> </li> <li > <a href="/docs/java/java-debugging" >Run and Debug</a> </li> <li > <a href="/docs/java/java-testing" >Testing</a> </li> <li > <a href="/docs/java/java-spring-boot" >Spring Boot</a> </li> <li > <a href="/docs/java/java-tomcat-jetty" >Application Servers</a> </li> <li > <a href="/docs/java/java-on-azure" >Deploy Java Apps</a> </li> <li > <a href="/docs/java/java-gui" >GUI Applications</a> </li> <li > <a href="/docs/java/extensions" >Extensions</a> </li> <li > <a href="/docs/java/java-faq" >FAQ</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#cpp-articles" data-parent="#main-nav" data-toggle="collapse">C++</a> <ul id="cpp-articles" class="collapse "> <li > <a href="/docs/cpp/introvideos-cpp" >Intro Videos</a> </li> <li > <a href="/docs/cpp/config-linux" >GCC on Linux</a> </li> <li > <a href="/docs/cpp/config-mingw" >GCC on Windows</a> </li> <li > <a href="/docs/cpp/config-wsl" >GCC on Windows Subsystem for Linux</a> </li> <li > <a href="/docs/cpp/config-clang-mac" >Clang on macOS</a> </li> <li > <a href="/docs/cpp/config-msvc" >Microsoft C++ on Windows</a> </li> <li > <a href="/docs/cpp/build-with-cmake" >Build with CMake</a> </li> <li > <a href="/docs/cpp/cmake-linux" >CMake Tools on Linux</a> </li> <li > <a href="/docs/cpp/cmake-quickstart" >CMake Quick Start</a> </li> <li > <a href="/docs/cpp/cpp-ide" >Editing and Navigating</a> </li> <li > <a href="/docs/cpp/cpp-debug" >Debugging</a> </li> <li > <a href="/docs/cpp/cpp-refactoring" >Refactoring</a> </li> <li > <a href="/docs/cpp/launch-json-reference" >Configure debugging</a> </li> <li > <a href="/docs/cpp/customize-default-settings-cpp" >Settings</a> </li> <li > <a href="/docs/cpp/configure-intellisense" >Configure IntelliSense</a> </li> <li > <a href="/docs/cpp/configure-intellisense-crosscompilation" >Configure IntelliSense for cross-compiling</a> </li> <li > <a href="/docs/cpp/faq-cpp" >FAQ</a> </li> </ul> </li> <li class="panel active expanded"> <a class="area" role="button" href="#csharp-articles" data-parent="#main-nav" data-toggle="collapse">C#</a> <ul id="csharp-articles" class="collapse in"> <li > <a href="/docs/csharp/introvideos-csharp" >Intro Videos</a> </li> <li > <a href="/docs/csharp/get-started" >Get Started</a> </li> <li > <a href="/docs/csharp/navigate-edit" >Navigate and Edit</a> </li> <li > <a href="/docs/csharp/intellicode" >IntelliCode</a> </li> <li > <a href="/docs/csharp/refactoring" >Refactoring</a> </li> <li > <a href="/docs/csharp/formatting-linting" >Formatting and Linting</a> </li> <li > <a href="/docs/csharp/project-management" >Project Management</a> </li> <li > <a href="/docs/csharp/build-tools" >Build Tools</a> </li> <li > <a href="/docs/csharp/package-management" >Package Management</a> </li> <li > <a href="/docs/csharp/debugging" >Run and Debug</a> </li> <li > <a href="/docs/csharp/testing" >Testing</a> </li> <li class="active"> <a href="/docs/csharp/cs-dev-kit-faq" aria-label="Current Page: FAQ">FAQ</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#containers-articles" data-parent="#main-nav" data-toggle="collapse">Docker</a> <ul id="containers-articles" class="collapse "> <li > <a href="/docs/containers/overview" >Overview</a> </li> <li > <a href="/docs/containers/quickstart-node" >Node.js</a> </li> <li > <a href="/docs/containers/quickstart-python" >Python</a> </li> <li > <a href="/docs/containers/quickstart-aspnet-core" >ASP.NET Core</a> </li> <li > <a href="/docs/containers/debug-common" >Debug</a> </li> <li > <a href="/docs/containers/docker-compose" >Docker Compose</a> </li> <li > <a href="/docs/containers/quickstart-container-registries" >Registries</a> </li> <li > <a href="/docs/containers/app-service" >Deploy to Azure</a> </li> <li > <a href="/docs/containers/choosing-dev-environment" >Choose a dev environment</a> </li> <li > <a href="/docs/containers/reference" >Customize</a> </li> <li > <a href="/docs/containers/bridge-to-kubernetes" >Develop with Kubernetes</a> </li> <li > <a href="/docs/containers/troubleshooting" >Tips and Tricks</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#datascience-articles" data-parent="#main-nav" data-toggle="collapse">Data Science</a> <ul id="datascience-articles" class="collapse "> <li > <a href="/docs/datascience/overview" >Overview</a> </li> <li > <a href="/docs/datascience/jupyter-notebooks" >Jupyter Notebooks</a> </li> <li > <a href="/docs/datascience/data-science-tutorial" >Data Science Tutorial</a> </li> <li > <a href="/docs/datascience/python-interactive" >Python Interactive</a> </li> <li > <a href="/docs/datascience/data-wrangler-quick-start" >Data Wrangler Quick Start</a> </li> <li > <a href="/docs/datascience/data-wrangler" >Data Wrangler</a> </li> <li > <a href="/docs/datascience/pytorch-support" >PyTorch Support</a> </li> <li > <a href="/docs/datascience/azure-machine-learning" >Azure Machine Learning</a> </li> <li > <a href="/docs/datascience/jupyter-kernel-management" >Manage Jupyter Kernels</a> </li> <li > <a href="/docs/datascience/notebooks-web" >Jupyter Notebooks on the web</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#azure-articles" data-parent="#main-nav" data-toggle="collapse">Azure</a> <ul id="azure-articles" class="collapse "> <li > <a href="/docs/azure/overview" >Overview</a> </li> <li > <a href="/docs/azure/gettingstarted" >Getting Started</a> </li> <li > <a href="/docs/azure/deployment" >Deployment</a> </li> <li > <a href="/docs/azure/docker" >Docker</a> </li> <li > <a href="/docs/azure/aksextensions" >Azure Kubernetes Service</a> </li> <li > <a href="/docs/azure/kubernetes" >Kubernetes</a> </li> <li > <a href="/docs/azure/mongodb" >MongoDB</a> </li> <li > <a href="/docs/azure/remote-debugging" >Remote Debugging for Node.js</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#remote-articles" data-parent="#main-nav" data-toggle="collapse">Remote</a> <ul id="remote-articles" class="collapse "> <li > <a href="/docs/remote/remote-overview" >Overview</a> </li> <li > <a href="/docs/remote/ssh" >SSH</a> </li> <li > <a href="/docs/remote/dev-containers" >Dev Containers</a> </li> <li > <a href="/docs/remote/wsl" >Windows Subsystem for Linux</a> </li> <li > <a href="/docs/remote/codespaces" >GitHub Codespaces</a> </li> <li > <a href="/docs/remote/vscode-server" >VS Code Server</a> </li> <li > <a href="/docs/remote/tunnels" >Tunnels</a> </li> <li > <a href="/docs/remote/ssh-tutorial" >SSH Tutorial</a> </li> <li > <a href="/docs/remote/wsl-tutorial" >WSL Tutorial</a> </li> <li > <a href="/docs/remote/troubleshooting" >Tips and Tricks</a> </li> <li > <a href="/docs/remote/faq" >FAQ</a> </li> </ul> </li> <li class="panel collapsed"> <a class="area" role="button" href="#devcontainers-articles" data-parent="#main-nav" data-toggle="collapse">Dev Containers</a> <ul id="devcontainers-articles" class="collapse "> <li > <a href="/docs/devcontainers/containers" >Overview</a> </li> <li > <a href="/docs/devcontainers/tutorial" >Tutorial</a> </li> <li > <a href="/docs/devcontainers/attach-container" >Attach to Container</a> </li> <li > <a href="/docs/devcontainers/create-dev-container" >Create a Dev Container</a> </li> <li > <a href="/docs/devcontainers/containers-advanced" >Advanced Containers</a> </li> <li > <a href="/docs/devcontainers/devcontainerjson-reference" >devcontainer.json</a> </li> <li > <a href="/docs/devcontainers/devcontainer-cli" >Dev Container CLI</a> </li> <li > <a href="/docs/devcontainers/tips-and-tricks" >Tips and Tricks</a> </li> <li > <a href="/docs/devcontainers/faq" >FAQ</a> </li> </ul> </li> </ul> </nav> <nav id="small-nav" aria-label="Topics" class="docs-nav hidden-md hidden-lg"> <label class="faux-h4" for="small-nav-dropdown">Topics</label> <select id="small-nav-dropdown" aria-label="topics"> <option value="/docs" >Overview</option> <optgroup label="Setup"> <option value="/docs/setup/setup-overview" >Overview</option> <option value="/docs/setup/linux" >Linux</option> <option value="/docs/setup/mac" >macOS</option> <option value="/docs/setup/windows" >Windows</option> <option value="/docs/setup/raspberry-pi" >Raspberry Pi</option> <option value="/docs/setup/network" >Network</option> <option value="/docs/setup/additional-components" >Additional Components</option> <option value="/docs/setup/enterprise" >Enterprise</option> <option value="/docs/setup/uninstall" >Uninstall</option> </optgroup> <optgroup label="Get Started"> <option value="/docs/getstarted/getting-started" >Tutorial</option> <option value="/docs/getstarted/introvideos" >Intro Videos</option> <option value="/docs/getstarted/tips-and-tricks" >Tips and Tricks</option> <option value="/docs/getstarted/userinterface" >User Interface</option> <option value="/docs/getstarted/themes" >Themes</option> <option value="/docs/getstarted/settings" >Settings</option> <option value="/docs/getstarted/keybindings" >Key Bindings</option> <option value="/docs/getstarted/locales" >Display Language</option> <option value="/docs/getstarted/telemetry" >Telemetry</option> <option value="/docs/getstarted/educators-and-students" >Educators & Students</option> </optgroup> <optgroup label="User Guide"> <option value="/docs/editor/codebasics" >Basic Editing</option> <option value="/docs/editor/extension-marketplace" >Extension Marketplace</option> <option value="/docs/editor/intellisense" >IntelliSense</option> <option value="/docs/editor/editingevolved" >Code Navigation</option> <option value="/docs/editor/refactoring" >Refactoring</option> <option value="/docs/editor/debugging" >Debugging</option> <option value="/docs/editor/testing" >Testing</option> <option value="/docs/editor/vscode-web" >VS Code for the Web</option> <option value="/docs/editor/tasks" >Tasks</option> <option value="/docs/editor/profiles" >Profiles</option> <option value="/docs/editor/settings-sync" >Settings Sync</option> <option value="/docs/editor/userdefinedsnippets" >Snippets</option> <option value="/docs/editor/emmet" >Emmet</option> <option value="/docs/editor/command-line" >Command Line Interface</option> <option value="/docs/editor/workspaces" >Workspaces</option> <option value="/docs/editor/workspace-trust" >Workspace Trust</option> <option value="/docs/editor/multi-root-workspaces" >Multi-root Workspaces</option> <option value="/docs/editor/accessibility" >Accessibility</option> <option value="/docs/editor/voice" >Voice Interactions</option> <option value="/docs/editor/custom-layout" >Custom Layout</option> <option value="/docs/editor/port-forwarding" >Port Forwarding</option> </optgroup> <optgroup label="Source Control"> <option value="/docs/sourcecontrol/overview" >Overview</option> <option value="/docs/sourcecontrol/intro-to-git" >Introduction to Git</option> <option value="/docs/sourcecontrol/github" >Collaborate on GitHub</option> <option value="/docs/sourcecontrol/faq" >FAQ</option> </optgroup> <optgroup label="Terminal"> <option value="/docs/terminal/getting-started" >Getting Started Tutorial</option> <option value="/docs/terminal/basics" >Terminal Basics</option> <option value="/docs/terminal/profiles" >Terminal Profiles</option> <option value="/docs/terminal/shell-integration" >Shell Integration</option> <option value="/docs/terminal/appearance" >Appearance</option> <option value="/docs/terminal/advanced" >Advanced</option> </optgroup> <optgroup label="GitHub Copilot"> <option value="/docs/copilot/overview" >Overview</option> <option value="/docs/copilot/copilot-vscode-features" >Copilot Cheat Sheet</option> <option value="/docs/copilot/setup" >Setup</option> <option value="/docs/copilot/getting-started" >Quickstart</option> <option value="/docs/copilot/ai-powered-suggestions" >Code Completions</option> <option value="/docs/copilot/copilot-chat" >Copilot Chat</option> <option value="/docs/copilot/getting-started-chat" >Copilot Chat Tutorial</option> <option value="/docs/copilot/copilot-edits" >Copilot Edits</option> <option value="/docs/copilot/prompt-crafting" >Best Practices</option> <option value="/docs/copilot/workspace-context" >Workspace Context</option> <option value="/docs/copilot/copilot-customization" >Customizing Copilot</option> <option value="/docs/copilot/copilot-extensibility-overview" >Copilot Extensibility</option> <option value="/docs/copilot/copilot-settings" >Settings Reference</option> <option value="/docs/copilot/faq" >FAQ</option> </optgroup> <optgroup label="Languages"> <option value="/docs/languages/overview" >Overview</option> <option value="/docs/languages/javascript" >JavaScript</option> <option value="/docs/languages/json" >JSON</option> <option value="/docs/languages/html" >HTML</option> <option value="/docs/languages/css" >CSS, SCSS and Less</option> <option value="/docs/languages/typescript" >TypeScript</option> <option value="/docs/languages/markdown" >Markdown</option> <option value="/docs/languages/powershell" >PowerShell</option> <option value="/docs/languages/cpp" >C++</option> <option value="/docs/languages/java" >Java</option> <option value="/docs/languages/php" >PHP</option> <option value="/docs/languages/python" >Python</option> <option value="/docs/languages/julia" >Julia</option> <option value="/docs/languages/r" >R</option> <option value="/docs/languages/ruby" >Ruby</option> <option value="/docs/languages/rust" >Rust</option> <option value="/docs/languages/go" >Go</option> <option value="/docs/languages/tsql" >T-SQL</option> <option value="/docs/languages/csharp" >C#</option> <option value="/docs/languages/dotnet" >.NET</option> <option value="/docs/languages/polyglot" >Polyglot</option> </optgroup> <optgroup label="Node.js / JavaScript"> <option value="/docs/nodejs/working-with-javascript" >Working with JavaScript</option> <option value="/docs/nodejs/nodejs-tutorial" >Node.js Tutorial</option> <option value="/docs/nodejs/nodejs-debugging" >Node.js Debugging</option> <option value="/docs/nodejs/nodejs-deployment" >Deploy Node.js Apps</option> <option value="/docs/nodejs/browser-debugging" >Browser Debugging</option> <option value="/docs/nodejs/angular-tutorial" >Angular Tutorial</option> <option value="/docs/nodejs/reactjs-tutorial" >React Tutorial</option> <option value="/docs/nodejs/vuejs-tutorial" >Vue Tutorial</option> <option value="/docs/nodejs/debugging-recipes" >Debugging Recipes</option> <option value="/docs/nodejs/profiling" >Performance Profiling</option> <option value="/docs/nodejs/extensions" >Extensions</option> </optgroup> <optgroup label="TypeScript"> <option value="/docs/typescript/typescript-tutorial" >Tutorial</option> <option value="/docs/typescript/typescript-compiling" >Compiling</option> <option value="/docs/typescript/typescript-editing" >Editing</option> <option value="/docs/typescript/typescript-refactoring" >Refactoring</option> <option value="/docs/typescript/typescript-debugging" >Debugging</option> </optgroup> <optgroup label="Python"> <option value="/docs/python/python-quick-start" >Quick Start</option> <option value="/docs/python/python-tutorial" >Tutorial</option> <option value="/docs/python/run" >Run Python Code</option> <option value="/docs/python/editing" >Editing Code</option> <option value="/docs/python/linting" >Linting</option> <option value="/docs/python/formatting" >Formatting</option> <option value="/docs/python/debugging" >Debugging</option> <option value="/docs/python/environments" >Environments</option> <option value="/docs/python/testing" >Testing</option> <option value="/docs/python/jupyter-support-py" >Python Interactive</option> <option value="/docs/python/tutorial-django" >Django Tutorial</option> <option value="/docs/python/tutorial-fastapi" >FastAPI Tutorial</option> <option value="/docs/python/tutorial-flask" >Flask Tutorial</option> <option value="/docs/python/tutorial-create-containers" >Create containers</option> <option value="/docs/python/python-on-azure" >Deploy Python Apps</option> <option value="/docs/python/python-web" >Python in the Web</option> <option value="/docs/python/settings-reference" >Settings Reference</option> </optgroup> <optgroup label="Java"> <option value="/docs/java/java-tutorial" >Getting Started</option> <option value="/docs/java/java-editing" >Navigate and Edit</option> <option value="/docs/java/java-refactoring" >Refactoring</option> <option value="/docs/java/java-linting" >Formatting and Linting</option> <option value="/docs/java/java-project" >Project Management</option> <option value="/docs/java/java-build" >Build Tools</option> <option value="/docs/java/java-debugging" >Run and Debug</option> <option value="/docs/java/java-testing" >Testing</option> <option value="/docs/java/java-spring-boot" >Spring Boot</option> <option value="/docs/java/java-tomcat-jetty" >Application Servers</option> <option value="/docs/java/java-on-azure" >Deploy Java Apps</option> <option value="/docs/java/java-gui" >GUI Applications</option> <option value="/docs/java/extensions" >Extensions</option> <option value="/docs/java/java-faq" >FAQ</option> </optgroup> <optgroup label="C++"> <option value="/docs/cpp/introvideos-cpp" >Intro Videos</option> <option value="/docs/cpp/config-linux" >GCC on Linux</option> <option value="/docs/cpp/config-mingw" >GCC on Windows</option> <option value="/docs/cpp/config-wsl" >GCC on Windows Subsystem for Linux</option> <option value="/docs/cpp/config-clang-mac" >Clang on macOS</option> <option value="/docs/cpp/config-msvc" >Microsoft C++ on Windows</option> <option value="/docs/cpp/build-with-cmake" >Build with CMake</option> <option value="/docs/cpp/cmake-linux" >CMake Tools on Linux</option> <option value="/docs/cpp/cmake-quickstart" >CMake Quick Start</option> <option value="/docs/cpp/cpp-ide" >Editing and Navigating</option> <option value="/docs/cpp/cpp-debug" >Debugging</option> <option value="/docs/cpp/cpp-refactoring" >Refactoring</option> <option value="/docs/cpp/launch-json-reference" >Configure debugging</option> <option value="/docs/cpp/customize-default-settings-cpp" >Settings</option> <option value="/docs/cpp/configure-intellisense" >Configure IntelliSense</option> <option value="/docs/cpp/configure-intellisense-crosscompilation" >Configure IntelliSense for cross-compiling</option> <option value="/docs/cpp/faq-cpp" >FAQ</option> </optgroup> <optgroup label="C#"> <option value="/docs/csharp/introvideos-csharp" >Intro Videos</option> <option value="/docs/csharp/get-started" >Get Started</option> <option value="/docs/csharp/navigate-edit" >Navigate and Edit</option> <option value="/docs/csharp/intellicode" >IntelliCode</option> <option value="/docs/csharp/refactoring" >Refactoring</option> <option value="/docs/csharp/formatting-linting" >Formatting and Linting</option> <option value="/docs/csharp/project-management" >Project Management</option> <option value="/docs/csharp/build-tools" >Build Tools</option> <option value="/docs/csharp/package-management" >Package Management</option> <option value="/docs/csharp/debugging" >Run and Debug</option> <option value="/docs/csharp/testing" >Testing</option> <option value="/docs/csharp/cs-dev-kit-faq" selected>FAQ</option> </optgroup> <optgroup label="Docker"> <option value="/docs/containers/overview" >Overview</option> <option value="/docs/containers/quickstart-node" >Node.js</option> <option value="/docs/containers/quickstart-python" >Python</option> <option value="/docs/containers/quickstart-aspnet-core" >ASP.NET Core</option> <option value="/docs/containers/debug-common" >Debug</option> <option value="/docs/containers/docker-compose" >Docker Compose</option> <option value="/docs/containers/quickstart-container-registries" >Registries</option> <option value="/docs/containers/app-service" >Deploy to Azure</option> <option value="/docs/containers/choosing-dev-environment" >Choose a dev environment</option> <option value="/docs/containers/reference" >Customize</option> <option value="/docs/containers/bridge-to-kubernetes" >Develop with Kubernetes</option> <option value="/docs/containers/troubleshooting" >Tips and Tricks</option> </optgroup> <optgroup label="Data Science"> <option value="/docs/datascience/overview" >Overview</option> <option value="/docs/datascience/jupyter-notebooks" >Jupyter Notebooks</option> <option value="/docs/datascience/data-science-tutorial" >Data Science Tutorial</option> <option value="/docs/datascience/python-interactive" >Python Interactive</option> <option value="/docs/datascience/data-wrangler-quick-start" >Data Wrangler Quick Start</option> <option value="/docs/datascience/data-wrangler" >Data Wrangler</option> <option value="/docs/datascience/pytorch-support" >PyTorch Support</option> <option value="/docs/datascience/azure-machine-learning" >Azure Machine Learning</option> <option value="/docs/datascience/jupyter-kernel-management" >Manage Jupyter Kernels</option> <option value="/docs/datascience/notebooks-web" >Jupyter Notebooks on the web</option> </optgroup> <optgroup label="Azure"> <option value="/docs/azure/overview" >Overview</option> <option value="/docs/azure/gettingstarted" >Getting Started</option> <option value="/docs/azure/deployment" >Deployment</option> <option value="/docs/azure/docker" >Docker</option> <option value="/docs/azure/aksextensions" >Azure Kubernetes Service</option> <option value="/docs/azure/kubernetes" >Kubernetes</option> <option value="/docs/azure/mongodb" >MongoDB</option> <option value="/docs/azure/remote-debugging" >Remote Debugging for Node.js</option> </optgroup> <optgroup label="Remote"> <option value="/docs/remote/remote-overview" >Overview</option> <option value="/docs/remote/ssh" >SSH</option> <option value="/docs/remote/dev-containers" >Dev Containers</option> <option value="/docs/remote/wsl" >Windows Subsystem for Linux</option> <option value="/docs/remote/codespaces" >GitHub Codespaces</option> <option value="/docs/remote/vscode-server" >VS Code Server</option> <option value="/docs/remote/tunnels" >Tunnels</option> <option value="/docs/remote/ssh-tutorial" >SSH Tutorial</option> <option value="/docs/remote/wsl-tutorial" >WSL Tutorial</option> <option value="/docs/remote/troubleshooting" >Tips and Tricks</option> <option value="/docs/remote/faq" >FAQ</option> </optgroup> <optgroup label="Dev Containers"> <option value="/docs/devcontainers/containers" >Overview</option> <option value="/docs/devcontainers/tutorial" >Tutorial</option> <option value="/docs/devcontainers/attach-container" >Attach to Container</option> <option value="/docs/devcontainers/create-dev-container" >Create a Dev Container</option> <option value="/docs/devcontainers/containers-advanced" >Advanced Containers</option> <option value="/docs/devcontainers/devcontainerjson-reference" >devcontainer.json</option> <option value="/docs/devcontainers/devcontainer-cli" >Dev Container CLI</option> <option value="/docs/devcontainers/tips-and-tricks" >Tips and Tricks</option> <option value="/docs/devcontainers/faq" >FAQ</option> </optgroup> </select> </nav> </div> <!-- small right nav --> <div class="col-xs-12 visible-xs"> <nav aria-labelledby="small-right-nav-label" class="small-nav docs-nav updates-nav"> <label class="faux-h4" for="small-right-nav-dropdown" id="small-right-nav-label">In this article</label> <select id="small-right-nav-dropdown" class="small-nav-select" aria-label="Sections"> <option value="#_general">General</option> <option value="#_licensing-and-contributing">Licensing and Contributing</option> <option value="#_net-sdk">.NET SDK</option> <option value="#_project-system">Project System</option> <option value="#_test-explorer">Test Explorer</option> <option value="#_debugger">Debugger</option> <option value="#_c-editor">C# Editor</option> <option value="#_razor-editor">Razor Editor</option> <option value="#_intellicode">IntelliCode</option> <option value="#_hot-reload">Hot Reload</option> </select> </nav> </div> <!-- main content --> <main class="col-xs-12 col-sm-9 col-md-8 body"> <div class="edit-github pull-right"> <a href="https://vscode.dev/github/microsoft/vscode-docs/blob/main/docs/csharp/cs-dev-kit-faq.md" class="btn btn-default" title="Edit this document in vscode.dev"> <span class="glyphicon glyphicon-pencil"></span> <span class="hidden-xs">Edit</span> </a> </div> <h1>C# Dev Kit FAQ</h1> <p>Use this FAQ (Frequently Asked Questions) topic to learn more about the C# Dev Kit extension and troubleshoot issues you may be experiencing.</p> <h2 id="_general" data-needslink="_general">General</h2> <h3 id="_what-is-c-dev-kit" data-needslink="_what-is-c-dev-kit">What is C# Dev Kit?</h3> <p><a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit" class="external-link" target="_blank">C# Dev Kit</a> 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 <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp" class="external-link" target="_blank">existing C# extension</a> 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.</p> <h3 id="_what-project-types-are-currently-supported" data-needslink="_what-project-types-are-currently-supported">What project types are currently supported?</h3> <p>C# Dev Kit supports building web apps, console apps, class library projects, and test projects for .NET Core, often also called .NET. The <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui" class="external-link" target="_blank">.NET MAUI extension</a> and the <a href="https://marketplace.visualstudio.com/items?itemName=visualstudiotoolsforunity.vstuc" class="external-link" target="_blank">Unity extension</a> are built on top of C# Dev Kit and provide additional support for building <a href="https://dotnet.microsoft.com/apps/maui" class="external-link" target="_blank">.NET Multi-platform App UI (MAUI)</a> apps and Unity apps. These extensions support the modern .NET project format, also known as &quot;sdk-style&quot; projects. If you are building non-SDK-format projects such as <a href="https://learn.microsoft.com/dotnet/standard/choosing-core-framework-server" class="external-link" target="_blank">.NET Framework</a> apps and Xamarin apps, see the <a href="#_project-system">Project System</a> section.</p> <h3 id="_what-extensions-are-included-in-c-dev-kit" data-needslink="_what-extensions-are-included-in-c-dev-kit">What extensions are included in C# Dev Kit?</h3> <p>Today the extensions included in the C# Dev Kit family are:</p> <ul> <li><a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit" class="external-link" target="_blank">C# Dev Kit</a></li> <li><a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscodeintellicode-csharp" class="external-link" target="_blank">IntelliCode for C# Dev Kit</a></li> <li><a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui" class="external-link" target="_blank">.NET MAUI</a></li> <li><a href="https://aka.ms/vscode-unity" class="external-link" target="_blank">Unity</a></li> </ul> <p>Use of these extensions are governed under the <a href="https://aka.ms/vs/csdevkit/license" class="external-link" target="_blank">EULA for the C# Dev Kit family of extensions</a>.</p> <p>These extensions also have dependencies that carry their own licensing – for example, C# Dev Kit depends on the <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp" class="external-link" target="_blank">C# extension</a> and <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime" class="external-link" target="_blank">.NET Install Tool</a>.</p> <h3 id="_why-isnt-c-dev-kit-activating-c-dev-kit-commands-are-not-found" data-needslink="_why-isnt-c-dev-kit-activating-c-dev-kit-commands-are-not-found">Why isn't C# Dev Kit activating / C# Dev Kit commands are not found?</h3> <p>There are a few reasons why C# Dev Kit doesn't activate when you attempt to edit a C# file.</p> <ol> <li><strong>version 2.0+ of the C# extension is not installed</strong>. 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.</li> <li><strong>workspace prefers C# extension</strong>. C# Dev Kit does not support .NET Framework projects and if you have set the <code>dotnet.preferCSharpExtension</code> 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.</li> <li><strong>using a readonly OS</strong>. 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.</li> </ol> <p>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.</p> <h2 id="_licensing-and-contributing" data-needslink="_licensing-and-contributing">Licensing and Contributing</h2> <h3 id="_who-can-use-c-dev-kit" data-needslink="_who-can-use-c-dev-kit">Who can use C# Dev Kit?</h3> <p>C# Dev Kit is available via a Community License for those who qualify and is also included as another addition to existing <a href="https://visualstudio.microsoft.com/subscriptions" class="external-link" target="_blank">Visual Studio Subscriptions</a>. This means that C# Dev Kit is available to use today for developers with active Visual Studio subscriptions.</p> <p>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.</p> <h3 id="_where-do-i-submit-feedback-and-suggestions" data-needslink="_where-do-i-submit-feedback-and-suggestions">Where do I submit feedback and suggestions?</h3> <p>Users can report an issue or a suggestion through VS Code's <strong>Help &gt; Report Issue</strong>. Select whether it is a bug, feature request, or performance issue, file on <strong>An extension</strong>, and select <strong>C# Dev Kit</strong> from the list of extensions.</p> <p><img src="/assets/docs/csharp/faq/help-report-issue.png" alt="Help &gt; Report Issue image" loading="lazy"></p> <h3 id="_is-c-dev-kit-open-source-why-not" data-needslink="_is-c-dev-kit-open-source-why-not">Is C# Dev Kit open source? Why not?</h3> <p>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 <a href="https://github.com/dotnet/roslyn" class="external-link" target="_blank">Roslyn</a> and <a href="https://github.com/dotnet/razor" class="external-link" target="_blank">Razor</a>. 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.</p> <h3 id="_how-can-i-contribute" data-needslink="_how-can-i-contribute">How can I contribute?</h3> <p>The C# extension, which is a part of the C# Dev Kit, is fully open source and is subject to <a href="https://devdiv.visualstudio.com/DevDiv/_git/vscode-csharp-next?path=/RuntimeLicenses/license.txt" class="external-link" target="_blank">these license terms</a>. The source code to this extension is available on <a href="https://github.com/dotnet/vscode-csharp" class="external-link" target="_blank">https://github.com/dotnet/vscode-csharp</a> and licensed under the MIT license.</p> <p>This project has adopted the code of conduct defined by the <a href="https://www.contributor-covenant.org" class="external-link" target="_blank">Contributor Covenant</a> to clarify expected behavior in our community. For more information, see the <a href="https://dotnetfoundation.org/about/policies/code-of-conduct" class="external-link" target="_blank">.NET Foundation Code of Conduct</a>. By signing the <a href="https://cla.dotnetfoundation.org/" class="external-link" target="_blank">CLA</a>, the community is free to use your contribution to .NET Foundation projects.</p> <h2 id="_net-sdk" data-needslink="_net-sdk">.NET SDK</h2> <h3 id="_install-script-timed-out" data-needslink="_install-script-timed-out">Install script timed out</h3> <p>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 <code>dotnetAcquisitionExtension.installTimeoutValue</code> to a custom value.</p> <p><a href="/docs/getstarted/settings">Learn more about configuring VS Code settings</a> and see below for an example of a custom timeout in a <code>settings.json</code> file. In this example, the custom timeout value is 180 seconds, or 3 minutes:</p> <pre class="shiki" style="background-color: #1e1e1e"><code><span class="line"><span style="color: #BBBBBB">{</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;dotnetAcquisitionExtension.installTimeoutValue&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #B5CEA8">180</span></span> <span class="line"><span style="color: #BBBBBB">}</span></span> <span class="line"></span></code></pre> <h3 id="_error-acquiring-net-sdk" data-needslink="_error-acquiring-net-sdk">Error acquiring .NET SDK</h3> <p><img src="/assets/docs/csharp/faq/error-acquiring-dotnet-7.png" alt="Error acquiring .NET SDK" loading="lazy"></p> <p>Note: If you are located in China, your .NET SDK download may be blocked and cause a timeout.</p> <p>You will need to make sure you have .NET SDK installed. As a workaround, you can point the .NET runtime acquisition extension to an existing .NET install:</p> <p><img src="/assets/docs/csharp/faq/point-dotnet-runtime-to-existing-dotnet-install.png" alt="Point the .NET runtime acquisition extension to an existing .NET SDK install" loading="lazy"></p> <h3 id="_how-do-i-manually-install-net" data-needslink="_how-do-i-manually-install-net">How do I manually install .NET?</h3> <p>If .NET installation is failing or you want to reuse an existing installation of .NET, you can use the <code>dotnetAcquisitionExtension.existingDotnetPath</code> setting. .NET can be manually installed from the <strong>C# Dev Kit Walkthrough</strong> or the <a href="https://dotnet.microsoft.com/download" class="external-link" target="_blank">.NET website</a>. To direct the extension to that installation, update your settings with the extension ID and the path as illustrated below:</p> <h4 id="_windows" data-needslink="_windows">Windows</h4> <pre class="shiki" style="background-color: #1e1e1e"><code><span class="line"><span style="color: #BBBBBB">{</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;dotnetAcquisitionExtension.existingDotnetPath&quot;</span><span style="color: #BBBBBB">: [</span></span> <span class="line"><span style="color: #BBBBBB"> {</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;extensionId&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;msazuretools.azurerm-vscode-tools&quot;</span><span style="color: #BBBBBB">,</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;path&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;C:</span><span style="color: #D7BA7D">\\</span><span style="color: #CE9178">Program Files</span><span style="color: #D7BA7D">\\</span><span style="color: #CE9178">dotnet</span><span style="color: #D7BA7D">\\</span><span style="color: #CE9178">dotnet.exe&quot;</span></span> <span class="line"><span style="color: #BBBBBB"> }</span></span> <span class="line"><span style="color: #BBBBBB"> ]</span></span> <span class="line"><span style="color: #BBBBBB">}</span></span> <span class="line"></span></code></pre> <h4 id="_macos" data-needslink="_macos">macOS</h4> <pre class="shiki" style="background-color: #1e1e1e"><code><span class="line"><span style="color: #BBBBBB">{</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;dotnetAcquisitionExtension.existingDotnetPath&quot;</span><span style="color: #BBBBBB">: [</span></span> <span class="line"><span style="color: #BBBBBB"> {</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;extensionId&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;msazuretools.azurerm-vscode-tools&quot;</span><span style="color: #BBBBBB">,</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;path&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;/usr/local/share/dotnet/dotnet&quot;</span></span> <span class="line"><span style="color: #BBBBBB"> }</span></span> <span class="line"><span style="color: #BBBBBB"> ]</span></span> <span class="line"><span style="color: #BBBBBB">}</span></span> <span class="line"></span></code></pre> <h3 id="_the-extension-thinks-i-am-offline-with-error-response-of-400-or-407-and-i-have-a-proxy" data-needslink="_the-extension-thinks-i-am-offline-with-error-response-of-400-or-407-and-i-have-a-proxy">The extension thinks I am offline with error response of 400 or 407, and I have a proxy</h3> <p>If your system uses a proxy and has registry access disabled, you need to explicitly set the proxy URL in the extension settings. Proxies are automatically detected when set via environment variables and the registry, but if your proxy is only managed via registry keys and registry access is disabled, the extension cannot find it. To set the proxy URL, add the extension setting below:</p> <pre class="shiki" style="background-color: #1e1e1e"><code><span class="line"><span style="color: #BBBBBB">{</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;dotnetAcquisitionExtension.proxyUrl&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;https://your_proxy_url:port&quot;</span></span> <span class="line"><span style="color: #BBBBBB">}</span></span> <span class="line"></span></code></pre> <h2 id="_project-system" data-needslink="_project-system">Project System</h2> <h3 id="_the-solution-explorer-reports-that-my-project-is-not-supported-in-c-dev-kit" data-needslink="_the-solution-explorer-reports-that-my-project-is-not-supported-in-c-dev-kit">The Solution Explorer reports that my project is not supported in C# Dev Kit</h3> <p>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.</p> <p><img src="/assets/docs/csharp/faq/solution-explorer-not-supported-framework.png" alt="Project Not Supported in Solution Explorer" loading="lazy"></p> <p>To resolve this issue, you have two options.</p> <p>You can <a href="https://learn.microsoft.com/dotnet/core/porting" class="external-link" target="_blank">update your project</a> to an SDK-style project to access all available C# Dev Kit features.</p> <p>Alternatively, you can delegate project and solution load to the <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp" class="external-link" target="_blank">C# extension</a>, using the <strong>Prefer CSharp Extension</strong> 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 <strong>Workspace</strong> tab. Then, search for &quot;Prefer CSharp&quot; in the search bar and check the box next to the <strong>Prefer CSharp Extension</strong> 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 <strong>Use C# Extension</strong> from the notification. This option will automatically select the <strong>Prefer CSharp Extension</strong> setting. Note that you'll need to reload VS Code for this setting to take effect.</p> <h3 id="_i-clicked-on-the-create-net-project-button-and-nothing-happened" data-needslink="_i-clicked-on-the-create-net-project-button-and-nothing-happened">I clicked on the &quot;Create .NET Project&quot; button and nothing happened</h3> <p>This usually occurs when there is an extension version mismatch. C# Dev Kit requires version 2.0 or greater of the <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp" class="external-link" target="_blank">C# extension</a>. 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.</p> <h3 id="_the-project-system-reports-that-it-ran-into-a-problem" data-needslink="_the-project-system-reports-that-it-ran-into-a-problem">The Project System reports that it ran into a problem</h3> <p>When an internal Project System error occurs, you'll generally see a notification like this pop up in a corner of VS Code:</p> <p><img src="/assets/docs/csharp/faq/failed-to-restore-solution.png" alt="Failed to Restore Solution" loading="lazy"></p> <p>Select the <strong>Open log</strong> 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.</p> <h3 id="_when-i-open-my-solution-i-get-the-notification-failed-to-restore-solution" data-needslink="_when-i-open-my-solution-i-get-the-notification-failed-to-restore-solution">When I open my solution, I get the notification &quot;Failed to restore solution&quot;</h3> <p>Select <strong>Show error</strong>. 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.</p> <h3 id="_the-solution-explorer-displays-a-compatible-net-sdk-was-not-found" data-needslink="_the-solution-explorer-displays-a-compatible-net-sdk-was-not-found">The Solution Explorer displays &quot;A compatible .NET SDK was not found&quot;</h3> <p>The most likely cause of this error is a <code>global.json</code> file that specifies a different SDK than what is installed on the system.</p> <p><img src="/assets/docs/csharp/faq/compatible-dotnet-sdk-not-found.png" alt="A compatible .NET SDK was not found" loading="lazy"></p> <p>Open the Output window and switch to the <strong>Projects</strong> pane to look for more information. You should see something like this:</p> <p><img src="/assets/docs/csharp/faq/output-window-projects.png" alt="Output Window Projects Pane" loading="lazy"></p> <p>To fix the issue, either update the <code>global.json</code> to specify an installed SDK or install the specified SDK from the <a href="https://aka.ms/dotnet/download" class="external-link" target="_blank">Download .NET</a> page.</p> <p>Next, close and reopen the workspace.</p> <p>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 <a href="https://aka.ms/dotnet/download" class="external-link" target="_blank">Download .NET</a>.</p> <h2 id="_test-explorer" data-needslink="_test-explorer">Test Explorer</h2> <h3 id="_why-dont-my-tests-appear-in-the-test-explorer-panel" data-needslink="_why-dont-my-tests-appear-in-the-test-explorer-panel">Why don't my tests appear in the Test Explorer panel?</h3> <p>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.</p> <p>C# Dev Kit also requires that it has built your project successfully before tests appear in the Test Explorer panel. Also, if a <strong>Clean</strong> is done on your project/solution, the test dlls are removed from the Test Explorer panel.</p> <p>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 <strong>Build</strong> or use <span class="dynamic-keybinding" data-commandId="workbench.action.tasks.build" data-osx="⇧⌘B" data-win="Ctrl+Shift+B" data-linux="Ctrl+Shift+B"><span class="keybinding">⇧⌘B</span> (Windows, Linux <span class="keybinding">Ctrl+Shift+B</span>)</span>. Once the build has been completed, your tests will appear in the Test Explorer panel.</p> <h3 id="_my-tests-appear-in-the-test-explorer-panel-but-i-cannot-debug-them" data-needslink="_my-tests-appear-in-the-test-explorer-panel-but-i-cannot-debug-them">My tests appear in the Test Explorer panel, but I cannot debug them</h3> <p>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.</p> <h3 id="_i-just-added-new-tests-to-my-test-project-and-they-are-not-appearing-in-the-test-explorer-panel" data-needslink="_i-just-added-new-tests-to-my-test-project-and-they-are-not-appearing-in-the-test-explorer-panel">I just added new tests to my test project, and they are not appearing in the Test Explorer panel?</h3> <p>C# Dev Kit requires that it has built your project successfully before tests will appear in the Test Explorer panel.</p> <p>Build your solution by right-clicking on the solution in the Solution Explorer and select <strong>Build</strong> or <span class="dynamic-keybinding" data-commandId="workbench.action.tasks.build" data-osx="⇧⌘B" data-win="Ctrl+Shift+B" data-linux="Ctrl+Shift+B"><span class="keybinding">⇧⌘B</span> (Windows, Linux <span class="keybinding">Ctrl+Shift+B</span>)</span>. Once the build has been completed, your tests will appear in the Test Explorer panel.</p> <h2 id="_debugger" data-needslink="_debugger">Debugger</h2> <h3 id="_when-i-f5-nothing-happens" data-needslink="_when-i-f5-nothing-happens">When I F5, nothing happens</h3> <p>Make sure you have a C# project open or that the active document is a <code>.cs</code> or <code>.razor</code> file. If the debugger still fails to load, make sure that both the C# Dev Kit and the C# extensions have been activated.</p> <h3 id="_when-i-f5-it-asks-me-to-select-a-debugger-how-do-i-know-which-one-to-pick" data-needslink="_when-i-f5-it-asks-me-to-select-a-debugger-how-do-i-know-which-one-to-pick">When I F5, it asks me to &quot;Select a Debugger&quot;. How do I know which one to pick?</h3> <p>If you're trying to debug .NET Console Applications, Blazor Server Apps, Blazor WebAssembly, or Web Applications, make sure to select the <strong>C#</strong> option. The other options may be part of other extensions such as <strong>Node</strong> for JavaScript debugging or <strong>Python</strong> for Python debugging, and are not part of C# Dev Kit.</p> <h3 id="_when-i-f5-it-prompts-me-to-input-a-password-macos-only" data-needslink="_when-i-f5-it-prompts-me-to-input-a-password-macos-only">When I F5, it prompts me to input a password (macOS only)</h3> <p>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.</p> <p>If you wish to disable these prompts, you can run the following commands:</p> <ul> <li><code>DevToolsSecurity --enable</code></li> <li><code>sudo dscl . append /Groups/_developer GroupMembership $USER</code></li> </ul> <h3 id="_why-is-debugging-not-working" data-needslink="_why-is-debugging-not-working">Why is debugging not working?</h3> <p>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.</p> <h3 id="_while-debugging-my-breakpoints-arent-binding" data-needslink="_while-debugging-my-breakpoints-arent-binding">While debugging, my breakpoints aren't binding</h3> <p>The process you're debugging is not built in Debug, make sure to build as debugging before debugging the process.</p> <h2 id="_c-editor" data-needslink="_c-editor">C# Editor</h2> <h3 id="_how-do-i-get-intellisense-to-work-correctly" data-needslink="_how-do-i-get-intellisense-to-work-correctly">How do I get IntelliSense to work correctly?</h3> <p>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 &quot;Trace&quot; in the Settings search bar, and set the <strong>Dotnet</strong> &gt; <strong>Server:</strong> to <strong>Trace</strong> from the drop-down. This option provides more output information to help the developer team diagnose the issue.</p> <p><img src="/assets/docs/csharp/faq/dotnet-server-trace.png" alt="Set Dotnet Server to Trace" loading="lazy"></p> <p>Once you've made this change, reload the window by opening the Command Palette (<span class="dynamic-keybinding" data-commandId="workbench.action.showCommands" data-osx="⇧⌘P" data-win="Ctrl+Shift+P" data-linux="Ctrl+Shift+P"><span class="keybinding">⇧⌘P</span> (Windows, Linux <span class="keybinding">Ctrl+Shift+P</span>)</span>), then typing &quot;Reload Window&quot; and pressing <span class="keybinding">Enter</span>. After reloading the window, check the project log in the Output panel (<span class="dynamic-keybinding" data-commandId="workbench.action.output.toggleOutput" data-osx="⇧⌘U" data-win="Ctrl+Shift+U" data-linux="Ctrl+K Ctrl+H"><span class="keybinding">⇧⌘U</span> (Windows <span class="keybinding">Ctrl+Shift+U</span>, Linux <span class="keybinding">Ctrl+K Ctrl+H</span>)</span>) and selecting <strong>Projects</strong> 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.</p> <h3 id="_c-extension-fails-to-launch-the-server" data-needslink="_c-extension-fails-to-launch-the-server">C# extension fails to launch the server</h3> <p>As a workaround, you can point the .NET runtime acquisition extension to an existing .NET 7 install with the <code>dotnetAcquisitionExtension.existingDotnetPath</code> setting:</p> <pre class="shiki" style="background-color: #1e1e1e"><code><span class="line"><span style="color: #BBBBBB">{</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;dotnetAcquisitionExtension.existingDotnetPath&quot;</span><span style="color: #BBBBBB">: [</span></span> <span class="line"><span style="color: #BBBBBB"> {</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;extensionId&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;msazuretools.azurerm-vscode-tools&quot;</span><span style="color: #BBBBBB">,</span></span> <span class="line"><span style="color: #BBBBBB"> </span><span style="color: #9CDCFE">&quot;path&quot;</span><span style="color: #BBBBBB">: </span><span style="color: #CE9178">&quot;C</span><span style="color: #D7BA7D">\\</span><span style="color: #CE9178">Program Files</span><span style="color: #D7BA7D">\\</span><span style="color: #CE9178">dotnet</span><span style="color: #D7BA7D">\\</span><span style="color: #CE9178">dotnet.exe&quot;</span></span> <span class="line"><span style="color: #BBBBBB"> }</span></span> <span class="line"><span style="color: #BBBBBB"> ]</span></span> <span class="line"><span style="color: #BBBBBB">}</span></span> <span class="line"></span></code></pre> <h3 id="_i-have-too-many-diagnostics-or-i-dont-have-enough-diagnostics" data-needslink="_i-have-too-many-diagnostics-or-i-dont-have-enough-diagnostics">I have too many diagnostics or I don't have enough diagnostics</h3> <p>The <a href="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp" class="external-link" target="_blank">C# extension</a> allows you to configure various background code analysis settings. To access the settings, go to <span class="filePreferencesPath"><strong>File</strong> &gt; <strong>Preferences</strong></span> &gt; <strong>Settings</strong> or use the keyboard shortcut (<span class="dynamic-keybinding" data-commandId="workbench.action.openSettings" data-osx="⌘," data-win="Ctrl+," data-linux="Ctrl+,"><span class="keybinding">⌘,</span> (Windows, Linux <span class="keybinding">Ctrl+,</span>)</span>). In the search bar, type &quot;analysis&quot; to narrow down the settings related to code analysis. Under <strong>Run background code analysis for:</strong>, you can choose the analysis scope from a drop-down menu. The default setting is to analyze open files, but you can customize it to full solution, none, or open documents.</p> <p><img src="/assets/docs/csharp/faq/background-code-analysis.png" alt="Configure Background Code Analysis" loading="lazy"></p> <p>You can also use an EditorConfig file to configure diagnostics and code analysis. To learn more about EditorConfig, check out the <a href="https://learn.microsoft.com/dotnet/fundamentals/code-analysis/code-style-rule-options" class="external-link" target="_blank">documentation</a>.</p> <p>If you're not seeing enough diagnostics or none at all, it's possible that your project isn't fully loaded. To check if this is the case, refer to the section <a href="#_how-do-i-get-intellisense-to-work-correctly">How do I get IntelliSense to work correctly?</a> It provides instructions on how to verify if your project is fully loaded.</p> <h2 id="_razor-editor" data-needslink="_razor-editor">Razor Editor</h2> <h3 id="_most-or-all-blazor-components-show-up-with-warnings" data-needslink="_most-or-all-blazor-components-show-up-with-warnings">Most or all Blazor components show up with warnings</h3> <p>Before Blazor components can be discovered, C# Dev Kit needs to load your project successfully. Additionally, the Razor language server requires a <code>project.razor.vscode.bin</code> file to be generated in order to understand the state of your projects. If this file isn't generated, or is generated without any components, the Razor experience may be affected.</p> <p>To improve performance, the extension sometimes defers generating or loading this file until you open your first <code>.razor</code> or <code>.cshtml</code> file. To ensure that there are no errors in the Solution Explorer for the project you're trying to use, check it carefully.</p> <p>If your project has loaded correctly, verify that a <code>project.razor.vscode.bin</code> file exists in the <code>obj\Debug\&lt;tfm&gt;</code> folder on your file system. Since it is a binary file, it isn't straight forward to verify the contents of the file directly, but in general most Razor projects should result in a file that is at least 150KB in size. If the file is only a few kilobytes it means that tag helpers and/or components are probably not being discovered correctly.</p> <p>To force the file to regenerate, close any open <code>.razor</code> or <code>.cshtml</code> files, reload the VS Code window, and once the project has loaded correctly, open any <code>.razor</code> or <code>.cshtml</code> file to trigger the regeneration process.</p> <h3 id="_target-framework-errors-are-mentioned-in-razor-files" data-needslink="_target-framework-errors-are-mentioned-in-razor-files">Target framework errors are mentioned in Razor files</h3> <p>The Razor language server generally does not have a concept of a &quot;solution&quot;, but instead loads projects based on the presence of a <code>project.razor.vscode.bin</code> file in the projects <code>obj\Debug\&lt;tfm&gt;</code> folder. Sometimes, old files from target frameworks that are no longer in use can cause confusion, making the Razor server think a project is multi-targeted or that some components are still referenced when they're not.</p> <p>To resolve this issue, clear out old folders from within the <code>obj</code> folder or clear all of them. Then, reload the VS Code window and open a <code>.razor</code> file. This should ensure that new JSON files are generated, and the old ones are removed.</p> <h2 id="_intellicode" data-needslink="_intellicode">IntelliCode</h2> <h3 id="_i-am-not-getting-whole-line-completions" data-needslink="_i-am-not-getting-whole-line-completions">I am not getting whole line completions</h3> <p>Whole line completions are disabled when the <a href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot" class="external-link" target="_blank">GitHub Copilot</a> extension is enabled to allow you to take advantage of the more advanced <a href="/docs/editor/github-copilot">AI completion</a> capabilities. You can verify that Copilot is enabled by checking if the Copilot logo is present in the lower right corner of VS Code.</p> <h2 id="_hot-reload" data-needslink="_hot-reload">Hot Reload</h2> <h3 id="_hot-reload-icon-not-appearing-after-i-started-debugging" data-needslink="_hot-reload-icon-not-appearing-after-i-started-debugging">Hot Reload icon not appearing after I started debugging</h3> <p>The debugger only starts a Hot Reload session if the option for Hot Reload is enabled in the C# Dev Kit <a href="/docs/csharp/debugging#_user-settings">debugger settings</a>. If the option is enabled, it is expected that the Hot Reload icon appears in the status bar while debugging:</p> <p><img src="/assets/docs/csharp/debugging/hotreload-statusbar.png" alt="Hot Reload icon in the bottom bar" loading="lazy"></p> <p>You can either click on the Hot Reload icon or can see diagnostic information by opening the <strong>C# Hot Reload</strong> Output window. If you don't see either of those, the project may not be supported by C# Dev Kit extension, see <a href="/docs/csharp/debugging#_supported-projects-and-scenarios">Hot Reload supported projects</a>.</p> <h3 id="_what-types-of-edits-are-supported-with-hot-reload" data-needslink="_what-types-of-edits-are-supported-with-hot-reload">What types of edits are supported with Hot Reload?</h3> <p>See <a href="https://learn.microsoft.com/visualstudio/debugger/supported-code-changes-csharp?view=vs-2022" class="external-link" target="_blank">Supported code changes</a> for a list of the supported C# code changes with Hot Reload.</p> <div class="feedback"></div> <div class="body-footer">5/3/2024</div> </main> <!-- medium right nav --> <div class="col-sm-3 col-md-2 hidden-xs docs-subnavbar-container"> <nav id="docs-subnavbar" aria-label="On Page" data-spy="affix" data-offset-top="20"> <h4><span class="sr-only">In this article there are 10 sections</span><span aria-hidden="true">In this article</span></h4> <ul class="nav"> <li><a href="#_general">General</a></li> <li><a href="#_licensing-and-contributing">Licensing and Contributing</a></li> <li><a href="#_net-sdk">.NET SDK</a></li> <li><a href="#_project-system">Project System</a></li> <li><a href="#_test-explorer">Test Explorer</a></li> <li><a href="#_debugger">Debugger</a></li> <li><a href="#_c-editor">C# Editor</a></li> <li><a href="#_razor-editor">Razor Editor</a></li> <li><a href="#_intellicode">IntelliCode</a></li> <li><a href="#_hot-reload">Hot Reload</a></li> </ul> <div class="connect-widget"></div> </nav> </div> <!-- end of page connect widget --> <div class="col-xs-12 visible-xs"> <div class="connect-widget"></div> </div> </div> </div> </div> </div> <footer role="contentinfo" class="container"> <div class="footer-container"> <div class="footer-row"> <div class="footer-social"> <ul class="links"> <li> <a href="https://go.microsoft.com/fwlink/?LinkID=533687"><img src="/assets/icons/x-icon.svg" class="x-icon" alt="Follow us on X"></a> </li> <li> <a href="https://github.com/microsoft/vscode"><img src="/assets/icons/github-icon.svg" alt="VS Code on Github"></a> </li> <li> <a href="https://www.youtube.com/@code"><img src="/assets/icons/youtube-icon.svg" alt="VS Code on YouTube"></a> </li> <script> function manageConsent() { if (siteConsent && siteConsent.isConsentRequired) { siteConsent.manageConsent(); } } </script> </ul> <a id="footer-microsoft-link" class="microsoft-logo" href="https://www.microsoft.com"> <img src="/assets/icons/microsoft.svg" alt="Microsoft homepage" /> </a> </div> </div> <div class="footer-row"> <ul class="links"> <li><a id="footer-support-link" href="https://support.serviceshub.microsoft.com/supportforbusiness/create?sapId=d66407ed-3967-b000-4cfb-2c318cad363d" target="_blank" rel="noopener">Support</a></li> <li><a id="footer-privacy-link" href="https://go.microsoft.com/fwlink/?LinkId=521839" target="_blank" rel="noopener">Privacy</a></li> <li style="display: none;"><a id="footer-cookie-link" style="cursor: pointer;" onclick="manageConsent()" target="_blank" rel="noopener">Manage Cookies</a></li> <li><a id="footer-terms-link" href="https://www.microsoft.com/legal/terms-of-use" target="_blank" rel="noopener">Terms of Use</a></li> <li><a id="footer-license-link" href="/License" target="_blank" rel="noopener">License</a></li> </ul> </div> </div> </footer> <script src="/dist/index.js"></script> <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "SoftwareApplication", "name" : "Visual Studio Code", "softwareVersion": "1.95", "offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }, "applicationCategory": "DeveloperApplication", "applicationSubCategory": "Text Editor", "alternateName": "VS Code", "datePublished": "2021-11-03", "operatingSystem": "Mac, Linux, Windows", "logo": "https://code.visualstudio.com/assets/apple-touch-icon.png", "screenshot": "https://code.visualstudio.com/assets/home/home-screenshot-win.png", "releaseNotes": "https://code.visualstudio.com/updates", "downloadUrl": "https://code.visualstudio.com/download", "license": "https://code.visualstudio.com/license", "softwareRequirements": "https://code.visualstudio.com/docs/supporting/requirements", "url" : "https://code.visualstudio.com", "author": { "@type": "Organization", "name": "Microsoft" }, "publisher": { "@type": "Organization", "name": "Microsoft" }, "maintainer": { "@type": "Organization", "name": "Microsoft" }, "potentialAction": { "@type": "SearchAction", "target": "https://code.visualstudio.com/Search?q={search_term_string}", "query-input": "required name=search_term_string" }, "sameAs" : [ "https://en.wikipedia.org/wiki/Visual_Studio_Code", "https://twitter.com/code", "https://www.youtube.com/code", "https://www.tiktok.com/@vscode", "https://github.com/microsoft/vscode" ] } </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10