✅ Can't get VSCode to run a C# Project
Hello,
In my upcoming class, I need to set up my Development environment, which includes a .NET 6.0 Framework as seen here (https://byui-cse.github.io/cse210-ww-course/unit01/dev-environment/)
However, no matter what I do, I cannot get the program to run.
I've installed both the .NET 6.0 and 8.0 SDKs and Runtimes
I've reinstalled the VSCode Extensions multiple times (including the experimental versions)
I manually went through all the files and changed 6.0 to 8.0
However, the following error appears, even after changing the dotnet path to the x64 installation location:
The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application 'restore' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet/download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
What am I doing wrong?
Microsoft
.NET Downloads (Linux, macOS, and Windows)
Official .NET downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of applications.
Select which .NET version to use - .NET
Learn how .NET automatically finds and chooses runtime versions for your program. Additionally, this article teaches you how to force a specific version.
13 Replies
can you do
dotnet --info
in a terminal and show the full output here please?Host:
Version: 7.0.14
Architecture: x86
Commit: 808851b07a
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x64 [C:\Program Files\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
dotnet command - .NET CLI
Learn about the dotnet command (the generic driver for the .NET CLI) and its usage.
Microsoft
.NET Downloads (Linux, macOS, and Windows)
Official .NET downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of applications.
okidoki, easy fix
$dotnetpath
* Open
powershell
in a terminal in admin mode as in the following video:
https://cdn.discordapp.com/attachments/569261465463160900/1157744344183341156/20230930-1822-10.7436061.mp4
* copy/paste the following script:
in case of an invalid setup detected, it will:
* tell you that it did (or not) detected an invalid Path
setup
* in case some action are require it will ask you to Press Enter to confirm
you have the x32 AND the x64 dotnets installed
and your x32 is "blocking" the x64
this script re-arranges the path so the x64 takes prescedent
That was surprisingly fast.
you are not the first, and wont be the last 🙂
I bugged my University's IT staff, Instructor for the Upcoming class, and finally the program authors before coming here (I'll have to tell the authors sorry for bothering them in the morning)
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
ye
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
:when:
Muchas Thank-You's