C# C# Basics C# Syntax Compile Errors

Robert Rydlewski
Robert Rydlewski
3,826 Points

Visual Studio doesn't work with C# and .Net ???

Hi, I want to work in the VisualStudio Code text editor. I installed C# extension as well as .Net framework. When I write in terminal: "dotnet --version " It shows me 3.1.102

But when I downloaded the file and open in ViscualStudio and run in terminal "dotnet run" the program doesn't work ?? This is the message: ```The framework 'Microsoft.NETCore.App', version '2.1.0' was not found.

  • The following frameworks were found: 3.1.2 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:

Only in the Workspace. This doesn't make any sense however that's the case. I thought it would be easy working with C# with VS but that's not the case. Does anyone have any clue what should I do ??