Unable to run dotnet project

Hello, I just installed dotnet core and am unable to launch a simple dotnet 8.0 project. dotnet is in PATH and it displays the correct version. SDK and runtime are installed as well. Any suggestions what could have gone wrong?
No description
No description
30 Replies
Pobiega
Pobiega2y ago
dotnet --info?
Devil's Advocate
Devil's AdvocateOP2y ago
No description
Devil's Advocate
Devil's AdvocateOP2y ago
No description
Pobiega
Pobiega2y ago
looks good at a glance. What version is the program you are trying to build/run? Can you show the .csproj file?
Buddy
Buddy2y ago
No workloads it seems (?), install the required workloads
Devil's Advocate
Devil's AdvocateOP2y ago
No description
Buddy
Buddy2y ago
You can call dotnet workload restore You must be in the root directory of the project
Devil's Advocate
Devil's AdvocateOP2y ago
restoring workloads did not help
Buddy
Buddy2y ago
Did it say something?
The dotnet workload restore command analyzes a project or solution to determine which workloads it needs, then installs any workloads that are missing.
Devil's Advocate
Devil's AdvocateOP2y ago
No description
Devil's Advocate
Devil's AdvocateOP2y ago
no changes its a fresh project i just created right after installing theSDK
Pobiega
Pobiega2y ago
created via dotnet new?
Devil's Advocate
Devil's AdvocateOP2y ago
no, this
No description
Devil's Advocate
Devil's AdvocateOP2y ago
im using Rider
Pobiega
Pobiega2y ago
okay just for testing, go to an empty directory and do dotnet new console -n test want to see if it can successfully create a hello world app and build it
Buddy
Buddy2y ago
Devil's Advocate
Devil's AdvocateOP2y ago
No description
Pobiega
Pobiega2y ago
okay excellent
Devil's Advocate
Devil's AdvocateOP2y ago
ok, ill try recreating the project with dotnet
Pobiega
Pobiega2y ago
so your SDK works
Buddy
Buddy2y ago
You have no aspnet runtime according to that
Devil's Advocate
Devil's AdvocateOP2y ago
according to pacman, runtime is installed as a dependency does dotnet search for it differently, to where it's unable to find it?
Pobiega
Pobiega2y ago
No description
Pobiega
Pobiega2y ago
snippet from dotnet --info on my machine I don't have a linux machine available for testing, but I just installed the dotnet SDK on WSL, created a dotnet new webapi project and it builds and runs as expected
Devil's Advocate
Devil's AdvocateOP2y ago
ok, found the issue
Pobiega
Pobiega2y ago
what was it?
Devil's Advocate
Devil's AdvocateOP2y ago
so as dependency pacman only installs NETCore.App runtime (dotnet-runtime) but i needed aspnet-runtime as well
Pobiega
Pobiega2y ago
👍 good to know. pacman you say, so this is for archlinux right?
Devil's Advocate
Devil's AdvocateOP2y ago
yeah, arch based distros, so Endeavour, Garuda and Manjaro also falls there
Pobiega
Pobiega2y ago
great, thanks Will keep this in mind for future questions 🙂

Did you find this page helpful?