skip to Main Content

I’m working on an older project that was built with .NET Framework not .NET Core. I have not previously worked too much C#. My understanding is that you can use vscode for it but getting it running has been difficult. When I run dotnot --list-sdks or --list-runtimes it only shows .NET Core. This link seems to indicate that shouldn’t be the case. dotnet sdk check also only lists core SDKs.

How do I get the dotnet command to correctly show installed .NET Framework SDKs in C:WindowsMicrosoft.NETFrameworkv4.0.30319?

Getting this running appears to be a prerequisite for getting the build sequence in vscode to correctly run as right now even with global.json set correctly vscode only sees .net core and complains on build.

2

Answers


  1. The VSCode page says there is limited support for .NET Framework with VSCode, and they recommend Visual Studio Community.

    "… many standard C# project types are not recognized
    by VS Code. An example of a non-supported project type is an ASP.NET
    MVC Application…. if you want to have a lightweight tool to edit a
    file – VS Code has you covered. If you want the best possible
    experience for those projects and development on Windows in general,
    we recommend Visual Studio Community."

    Login or Signup to reply.
  2. This link seems to indicate that shouldn’t be the case.

    It actually indicates that this should be the case:

    This article applies to: ✔️ .NET 6 and later versions

    .NET Framework is an older iteration of the runtime (initially released in 2002, targeted Windows) which has release versions from 1.0 to 4.8.1 ATM (docs)

    .NET 6 is current LTS of the new iteration of the runtime (huge rewrite was made, with goal to significantly improve it and make it cross-platform, initial release in 2016), which was called originally .NET Core (release versions from 1.0 till 3.1 were called .NET Core, 4th version was skipped to prevent at least some confusion and versions from .NET 5 are skipping the Core part in their names – docs)

    Basically dotnet is CLI tool for newer iteration of runtime and should be used only for it.

    So answer to:

    How do I get the dotnet command to correctly show installed .NET Framework SDKs

    Is – you don’t.

    Read more:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search