📅
⏱️ 1 min read (140 words)
Today I came across this problem while trying to use dotnet core on my Ubuntu 22.04.2 system.
The below message was displayed when running dotnet commands like dotnet new
and dotnet run
.
A fatal error occurred. The folder [/usr/share/dotnet/host/fxr] does not exist.
This problem seems to be potentially related to the different packages provided by the Ubuntu feed and the Microsoft feed, more info on that over here
To fix this I followed the below steps…
sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
touch /etc/apt/preferences
Package: dotnet* aspnet* netstandard*
Pin: origin "packages.microsoft.com"
Pin-Priority: -10
Hopefully that solves it for you!
Health ❤️ ❤️ ❤️ ❤️ ❤️
See you soon 🗡️