when I tried to run my c# dotnet project, the console throws this error:
You must install or update .NET to run this application.
App: C:UserschoijOneDrive
Framework: 'Microsoft.NETCore.App', version '8.0.0' (x64)
.NET location: C:UserschoijOneDrive
No frameworks were found.
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=x64&rid=win-x64&os=win10
and this is what happens when I type C:Userschoij>dotnet --list-runtimes
on cmd:
C:Userschoij>dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.30 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.30 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.30 [C:Program FilesdotnetsharedMicrosoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:Program FilesdotnetsharedMicrosoft.WindowsDesktop.App]
*I’m on windows
I think the visual studio has a wrong .net location. I think it shouldn’t be C:UserschoijOneDrive
It’s strange because the same project ran without error few minutes ago. I’m suddenly getting this error. I tried to research but couldn’t find the same case.
I tried :
-adding C:Program Filesdotnet
on the system PATH variable.