C
C#2w ago
wav3

Can't build anything in dotnet 8. Not even template project.

I get this error when i try to build any project on Ubuntu 24.04 The project has just been made with dotnet new classlib
relt@relt-MS-7D95:/media/relt/M2/Blendesonite/test$ dotnet build
MSBuild version 17.8.5+b5265ef37 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : Could not execute because the specified command or file was not found. [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : Possible reasons for this include: [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : * You misspelled a built-in dotnet command. [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : * You intended to execute a .NET program, but dotnet-exec does not exist. [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. [/media/relt/M2/Blendesonite/test/test.csproj]

Build FAILED.
0 Warning(s)
5 Error(s)
relt@relt-MS-7D95:/media/relt/M2/Blendesonite/test$ dotnet build
MSBuild version 17.8.5+b5265ef37 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : Could not execute because the specified command or file was not found. [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : Possible reasons for this include: [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : * You misspelled a built-in dotnet command. [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : * You intended to execute a .NET program, but dotnet-exec does not exist. [/media/relt/M2/Blendesonite/test/test.csproj]
/usr/lib/dotnet/sdk/8.0.110/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. [/media/relt/M2/Blendesonite/test/test.csproj]

Build FAILED.
0 Warning(s)
5 Error(s)
No description
8 Replies
333fred
333fred2w ago
Sounds like your SDK install is corrupt or broken. That's failing when attemping to invoke csc I'd reinstall it
wav3
wav3OP2w ago
How? I already removed it and installed dotnet-sdk-8.0
333fred
333fred2w ago
What does ls -la /usr/lib/dotnet/sdk/8.0.110/Roslyn/ show?
wav3
wav3OP2w ago
No description
333fred
333fred2w ago
What about in bincore?
wav3
wav3OP2w ago
No description
333fred
333fred2w ago
Hmm. I'm afraid I don't have a good answer for you. That all looks fine
wav3
wav3OP2w ago
Decided to just use a docker container it works i guess
Want results from more Discord servers?
Add your server