Hello friends,
I have programmed with dotnet on Manjaro for ages. Last week, I reinstalled Manjaro for some reason and now, I just do not manage to make it run again. I have read hundreds of different articles, but nothing rally helps. It seems like everything is installed, but it still says, that the framework is not there.
Here are the outputs of some commands:
➜ ~ dotnet --list-sdks
6.0.126 [/usr/share/dotnet/sdk]
8.0.102 [/usr/share/dotnet/sdk]
➜ ~ dotnet --info
.NET SDK:
Version: 8.0.102
Commit: b7800db369
Workload version: 8.0.100-manifests.03fa9662
Runtime Environment:
OS Name: manjaro
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /usr/share/dotnet/sdk/8.0.102/
.NET workloads installed:
Workload version: 8.0.100-manifests.03fa9662
There are no installed workloads to display.
Host:
Version: 8.0.2
Architecture: x64
Commit: 1381d5ebd2
.NET SDKs installed:
6.0.126 [/usr/share/dotnet/sdk]
8.0.102 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.26 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.26 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
DOTNET_ROOT [/usr/share/dotnet/]
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
➜ ~ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.26 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.2 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.26 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
So it seems that I have installed both version 6 and 8 on my machine and that DOTNET_ROOT is set correctly (according to what they say in the Internett).
The way I have installed those is like this:
trizen -S dotnet-runtime
trizen -S dotnet-runtime-6.0
trizen -S dotnet-sdk
trizen -S dotnet-sdk-6.0
trizen -S aspnet-runtime
trizen -S aspnet-runtime-6.0
I am actually not sure if I actually need aspnet, since there have been different manuals in the Internet, but it does not work both with and without it.
So what is actually not working? I am using Rider and it seems like I can build projects.
But when I try to use dotnet start or watch, I get this:
The imported project "/usr/share/dotnet/sdk/8.0.102/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "/usr/share/dotnet/sdk/8.0.102/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" is correct, and that the file exists on disk. /home/Workspace/DotnetTest1/DotnetTest1/DotnetTest1.csproj
I also get this one in the IDE:
One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?
I have searched the Internet, but I don’t find what is wrong here, is there somebody who can encrypt the obvious to me?