Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics C# Syntax Compile Errors

Robert Rydlewski
Robert Rydlewski
3,828 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 ??