Share via

.NET SDK not installed

Patrick Loftis 5 Reputation points
2026-02-14T19:17:50.1033333+00:00

Screenshot 2026-02-11 220349.png

I am developing an Avalonia application in VS Code and everything has worked just fine until last week, when I started getting this pop up. I have uninstalled, reinstalled, updated, repaired, and restarted numerous times with no success. I am positive I have .NET SDK installed, but VS Code, for whatever reason can't find it, or at least claims it can't find it. The only thing this really affects to my knowledge is the AXAML previewer, which is very annoying because I don't want to run my program every time I need to verify a UI change. Any help is appreciated, and I will gladly share more info if needed. Thanks!

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

{count} vote

2 answers

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 14,955 Reputation points Microsoft External Staff Moderator
    2026-02-16T03:41:25.7666667+00:00

    Hi @Patrick Loftis ,

    Thanks for reaching out.

    Glad to hear the Avalonia previewer is working again.

    Based on what you described (everything functioning normally, dotnet clearly installed, builds working fine), the popup is very likely coming from a VS Code extension startup check rather than an actual missing SDK. Sometimes an extension (often the C# or Avalonia extension) performs an early environment validation when VS Code launches. If that check runs before the environment is fully resolved, or if it briefly fails to detect dotnet in PATH, you can get the warning even though the SDK is correctly installed and usable.

    Since:

    • dotnet --info works
    • Your project builds and runs
    • The previewer is functioning

    there’s no indication of a real SDK issue. At that point, it’s typically one of these:

    • A stale extension cache
    • A transient PATH resolution issue at startup
    • A minor bug in the extension’s detection logic

    If it becomes annoying, you could try:

    • Reloading the window (Developer: Reload Window)
    • Updating or reinstalling the C# / Avalonia extension
    • Checking VS Code -> Extensions -> Output panel to see which extension is throwing the message

    But if everything continues to work normally, it’s safe to treat it as a cosmetic detection issue rather than a broken SDK installation.

    Hope this helps! If my explanation was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    1 person found this answer helpful.
    0 comments No comments

  2. Marcin Policht 82,355 Reputation points MVP Volunteer Moderator
    2026-02-14T19:35:07.1166667+00:00

    That message typically means VS Code (or the Avalonia extension process) cannot see the dotnet executable in its environment, even though it is installed on the machine. The first thing to verify is what VS Code actually sees versus what your system sees. Open the integrated terminal inside VS Code and run:

    dotnet --info
    

    If that fails inside VS Code but works in your normal system terminal, then VS Code is launching without the correct PATH. Completely close VS Code and reopen it from a terminal where dotnet --info works, for example:

    code .
    

    On macOS and Linux this is common because GUI apps do not inherit shell PATH variables. If reopening from a shell fixes the warning, the long-term solution is to move your dotnet path export into a global profile like /etc/paths, /etc/profile, or your desktop environment config instead of .zshrc or .bashrc.

    If dotnet --info works in VS Code but the popup still appears, check exactly which binary is being used:

    which dotnet
    

    or on Windows:

    where dotnet
    

    Make sure it points to a real SDK location such as /usr/local/share/dotnet/dotnet, /usr/local/bin/dotnet, or C:\Program Files\dotnet\dotnet.exe. Then confirm SDKs are actually present:

    dotnet --list-sdks
    

    If that prints nothing, you have only the runtime installed and the Avalonia extension is correct that the SDK is missing.

    Another frequent cause is architecture mismatch. If you are on Apple Silicon or Windows ARM and installed only x64 SDK while running an ARM build of VS Code (or vice versa), the extension cannot load the SDK. Compare architectures:

    dotnet --info
    

    and also check VS Code with “Help → About” to confirm both are either arm64 or x64.

    If everything above looks correct, explicitly tell VS Code where dotnet lives by adding this to your user settings JSON:

    "dotnet.dotnetPath": "/absolute/path/to/dotnet"
    

    or on Windows:

    "dotnet.dotnetPath": "C:\\Program Files\\dotnet\\dotnet.exe"
    

    Then reload the window with:

    Developer: Reload Window
    

    Another thing that recently broke Avalonia previewer for some people is a leftover global.json pinning an SDK version that is no longer installed. Check your repo root for global.json and compare its version with:

    dotnet --list-sdks
    

    If the version in global.json is missing, either install that SDK or update the file.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.