C
C#11mo ago
Khajgold

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
Pobiega11mo ago
dotnet --info?
Khajgold
KhajgoldOP11mo ago
No description
Khajgold
KhajgoldOP11mo ago
No description
Pobiega
Pobiega11mo ago
looks good at a glance. What version is the program you are trying to build/run? Can you show the .csproj file?
Buddy
Buddy11mo ago
No workloads it seems (?), install the required workloads
Khajgold
KhajgoldOP11mo ago
No description
Buddy
Buddy11mo ago
You can call dotnet workload restore You must be in the root directory of the project
Khajgold
KhajgoldOP11mo ago
restoring workloads did not help
Buddy
Buddy11mo 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.
Khajgold
KhajgoldOP11mo ago
No description
Khajgold
KhajgoldOP11mo ago
no changes its a fresh project i just created right after installing theSDK
Pobiega
Pobiega11mo ago
created via dotnet new?
Khajgold
KhajgoldOP11mo ago
no, this
No description
Khajgold
KhajgoldOP11mo ago
im using Rider
Pobiega
Pobiega11mo 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
Buddy11mo ago
Khajgold
KhajgoldOP11mo ago
No description
Pobiega
Pobiega11mo ago
okay excellent
Khajgold
KhajgoldOP11mo ago
ok, ill try recreating the project with dotnet
Pobiega
Pobiega11mo ago
so your SDK works
Buddy
Buddy11mo ago
You have no aspnet runtime according to that
Khajgold
KhajgoldOP11mo 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
Pobiega11mo ago
No description
Pobiega
Pobiega11mo 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
Khajgold
KhajgoldOP11mo ago
ok, found the issue
Pobiega
Pobiega11mo ago
what was it?
Khajgold
KhajgoldOP11mo ago
so as dependency pacman only installs NETCore.App runtime (dotnet-runtime) but i needed aspnet-runtime as well
Pobiega
Pobiega11mo ago
👍 good to know. pacman you say, so this is for archlinux right?
Khajgold
KhajgoldOP11mo ago
yeah, arch based distros, so Endeavour, Garuda and Manjaro also falls there
Pobiega
Pobiega11mo ago
great, thanks Will keep this in mind for future questions 🙂
Want results from more Discord servers?
Add your server