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
The VSCode page says there is limited support for .NET Framework with VSCode, and they recommend Visual Studio Community.
It actually indicates that this should be the case:
.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:
Is – you don’t.
Read more:
dotnet
command