You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Fedora 33. This is what I see from dnf search dotnet --refresh:
================================================================= Name Exactly Matched: dotnet =================================================================
dotnet.x86_64 : .NET Core CLI tools and runtime
===================================================================== Name Matched: dotnet =====================================================================
dotnet-apphost-pack-3.1.x86_64 : Targeting Pack for Microsoft.NETCore.App 3.1
dotnet-build-reference-packages.x86_64 : Reference packages needed by the .NET Core SDK build
dotnet-host.x86_64 : .NET command line launcher
dotnet-hostfxr-3.1.x86_64 : .NET Core command line host resolver
dotnet-runtime-3.1.x86_64 : NET Core 3.1 runtime
dotnet-sdk-3.1.x86_64 : .NET Core 3.1 Software Development Kit
dotnet-sdk-3.1-source-built-artifacts.x86_64 : Internal package for building .NET Core 3.1 Software Development Kit
dotnet-targeting-pack-3.1.x86_64 : Targeting Pack for Microsoft.NETCore.App 3.1
dotnet-templates-3.1.x86_64 : .NET Core 3.1 templates
The packages without the version suffix are also for 3.1, as demonstrated by dnf info dotnet:
Installed Packages
Name : dotnet
Version : 3.1.109
Release : 1.fc33
Architecture : x86_64
Size : 0.0
Source : dotnet3.1-3.1.109-1.fc33.src.rpm
Repository : @System
From repo : updates
Summary : .NET Core CLI tools and runtime
URL : https://github.com/dotnet/
License : MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
Description : .NET Core is a fast, lightweight and modular platform for creating
: cross platform applications that work on Linux, macOS and Windows.
:
: It particularly focuses on creating console applications, web
: applications and micro-services.
:
: .NET Core contains a runtime conforming to .NET Standards a set of
: framework libraries, an SDK containing compilers and a 'dotnet'
: application to drive everything.
In case it's useful, the following is the output of dnf repolist:
@rbhanda is this a case of the "default" feeds? Fedora 32 had Core 3.1 in the default feed (no instructions given to include a microsoft specific package feed), is it not available in the default feed for 33?
It seems like the Microsoft documentation says "use the Fedora packages" which is a good idea, except when the Fedora packages are not ready yet - basically what happened with 5.0 😞
The instructions on release notes doesn't ask me to add Microsoft's repo into yum.repos.d, where instructions for older fedora versions are included.
I'm fine adding Microsoft's repo config, since the updates repo maintained by donet-sig might lag behind Microsoft's release to some degree. However, I believe it should be clearly documented on dotnet's website.
If customers want to use .NET 5 right now on CentOS, Fedora or RHEL, they should probably get it from Microsoft because the other versions are missing or too old.
We (Red Hat and Microsoft) are trying to fix this but it will take a while (probably a few weeks) to resolve completely.
I'm currently on Fedora 33 but I work on a lot of projects targeting .NET Core 2.1.
I just spent half an hour troubleshooting very weird issues because I had added the Microsoft Yum repo and apparently that recently has started conflicting with the Fedora repo. Long story short I followed the instructions at dotnet/sdk#11533 (comment).
Now I have the dotnet-sdk-3.1 installed from Fedora repo but I can't run any unit test projects as these are targeting 2.1 currently.
How can I best get dotnet-sdk-2.1 on my machine too?
Edit: answer seems to be at #4655 (comment) (for anyone coming after me).
Now I have to tinker some more with repositories and yum configuration... I hope Microsoft can sort this mess out - I'm sorry for calling it that, but this has not exactly been a pleasant experience. Especially considering that the documentation does not seem to mention any of these caveats, and on top of that 2.1 is officially supported on Fedora 33.
Edit 2:
After following the mentioned instructions, I have successfully installed dotnet-sdk-2.1, but now it seems impossible to install dotnet-sdk-3.1 as well!
sudo dnf install dotnet-sdk-3.1
Last metadata expiration check: 0:03:48 ago on do 03 dec 2020 18:18:01.
Error:
Problem: conflicting requests
package dotnet-sdk-3.1-3.1.109-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
package dotnet-sdk-3.1-3.1.110-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
package dotnet-sdk-3.1-3.1.403-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
package dotnet-sdk-3.1-3.1.404-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
package dotnet-targeting-pack-3.1-3.1.10-1.fc33.x86_64 is filtered out by exclude filtering
package dotnet-targeting-pack-3.1-3.1.8-1.fc33.x86_64 is filtered out by exclude filtering
(try to add '--skip-broken' to skip uninstallable packages)
@rbhanda thanks for the swift intervention, but alas I still have the same problem. If you open the URL in a browser you get an index, and indeed dotnet-targeting-pack-3.1 is still not on there.
Thanks for the fix. I was able to install dotnet-sdk-3.1 now.
But I would like to know what the plans are for .NET Core in the official Fedora repositories. Core 2.1 has a bit of support in it left, so will it be "migrated"?
To be clear: as a professional .NET developer on Linux, I specifically chose Fedora because it is officially supported by .NET and I like it by far the most between the other choices. But for "officially supported", I found this experience to be quite a bump in the road. The docs are not clear on what is in the official Fedora repo and what needs the MS repo. And even if you do the MS repo, you are going to run into conflicts with the official repo that are not documented either.
I would appreciate if the team still works to smoothen this out further to have a good out-of-the-box experience because I can imagine a lot of people are going through the same trouble.
@mario-d-s 2.1 is too old for us to backport A LOT of work that went into being able to properly build dotnet from source. Long story short is, that 2.1 can not be built from source code, and therefor it can not be packaged in Fedora.
Fedora ships 3.1 and will ship 5.0 (which was also not possible to build from source until 3 days ago) Everything around these versions is (will be) in Fedora, you do not need any additional repositories. Simply type dnf install dotnet and you will get the latest sdk.
@mario-d-s the recommended way is to not use MS repositories at all, for any version. If you need both 3.1 and 2.1 you can use our copr repository for 2.1 which is compatible with Fedora proper and 3.1 and will work side by side.
The end user can actually google all this - if they only click on the links that say fedoraproject.org instead of the microsoft.com ones ;) ;)
@RheaAyase thanks for the additional info! I will follow your recommendation of switching to the COPR repository. Indeed googling a bit more I could have found this too. I was convinced however that it was Microsoft/.NET that should be supporting Fedora and not the other way around. Goes to show how much hard work the Fedora people are actually doing and it all adds up to what a great distro it is indeed. Thanks for that!
Since this issue is closed, does it mean I just need to wait until the Microsoft repo gets updated? Or do I need to do something on my machine so that I can install both?
@MightyCreak this is not a bug, it's a well known feature that MS packages are not compatible with open source builds. And there is nothing we can do about it on the open source side. One should simply not combine these two because they're built in completely different way (open source vs binary magic) and they do not install the same way either.
There are two possible solutions should you wish to use 3.1 and 5.0 at the same time:
Using MS packages only (use higher priority on MS repository than Fedora repository)
Using Fedora only packages - 3.1 from the proper repository, and for 5.0 you can enable copr repositories while we're working on releasing it for Fedora proper (tldr building of dotnet from source lags behind release a few months, MS packages use different build pipeline.)
Like I said. If you want to use the worse of the two options (a) you need to edit the repo file and increase the priority. (Add priority = 1 for the highest priority, 99 is the lowest.)
Then I don't have the asp.net core 3.1 runtime, as you can see here I only have the .Net Core and ASP.NET Core 5.0.1:
No you actually do end up having both. Long story short HOST is the executable and is always provided from the highest version of dotnet, so in theory even if you were to install dotnet-sdk-3.1 alone, you would still have HOST package from the 5.0 - it is neither the sdk nor the runtime.
Either way though, you should NEVER install packages from two different sources at the same time. It doesn't matter if it's dotnet, golang, or google chrome. It will always cause problems.
I might end up having both, but VS Code didn't want to compile and run my .NET Core 3.1 projects. So, as an end user, it wasn't working.
Either way though, you should NEVER install packages from two different sources at the same time. It doesn't matter if it's dotnet, golang, or google chrome. It will always cause problems.
I agree 200% and that's what I wanted to achieve. I simply didn't know how to prevent this.
Just out of curiosity, why do you consider this solution "the worse of the two options"?
Because these are proprietary binary blobs built by unknown magic shipped with unknown licensed code inside :P
Fedora packaging requirements guarantee that everything is built from known source, on Fedora and for Fedora. And even all the tools used to build it are also built from known source on Fedora and for Fedora. Which is why it's so difficult to build .NET, historically very closed off platform, the open source way. Even though the source is available, all the tooling used wasn't open until very recently and even now it always lags behind Microsoft's releases.
Activity
omajid commentedon Aug 17, 2020
Done via dotnet/runtime#32752 (master, 5.0) dotnet/corefx#42871 (release/3.1) and dotnet/corefx#42872 (release/2.1)
adegeo commentedon Nov 12, 2020
@rbhanda Hey there. According to @LukeXuan .NET 5 isn't showing up in the fedora feeds.
@LukeXuan what version of fedora are you using?
LukeXuan commentedon Nov 12, 2020
I'm using Fedora 33. This is what I see from
dnf search dotnet --refresh:The packages without the version suffix are also for
3.1, as demonstrated bydnf info dotnet:In case it's useful, the following is the output of
dnf repolist:rbhanda commentedon Nov 12, 2020
If you follow the instructions on release notes are you still installing 3.1.109 instead of .NET 5?
I can see that .NET 5 is available on package feed at https://packages.microsoft.com/fedora/33/prod/
adegeo commentedon Nov 12, 2020
@rbhanda is this a case of the "default" feeds? Fedora 32 had Core 3.1 in the default feed (no instructions given to include a microsoft specific package feed), is it not available in the default feed for 33?
omajid commentedon Nov 12, 2020
https://www.reddit.com/r/Fedora/comments/jt0zvf/how_to_get_net_5_sdk_in_fedora_33/ has a similar issue.
It seems like the Microsoft documentation says "use the Fedora packages" which is a good idea, except when the Fedora packages are not ready yet - basically what happened with 5.0 😞
In that case, perhaps the docs can point to https://packages.microsoft.com/fedora/33/prod/ as the alternate mechanism?
LukeXuan commentedon Nov 12, 2020
The instructions on release notes doesn't ask me to add Microsoft's repo into
yum.repos.d, where instructions for older fedora versions are included.I'm fine adding Microsoft's repo config, since the
updatesrepo maintained by donet-sig might lag behind Microsoft's release to some degree. However, I believe it should be clearly documented on dotnet's website.adegeo commentedon Nov 12, 2020
@omajid Is this the same case with RHEL?
@LukeXuan @rbhanda I'm updating the docs via dotnet/docs#21526
omajid commentedon Nov 12, 2020
Pretty much. RHEL 8 has .NET 5 packages, except they are old (5.0 Preview 8 right now). RHEL 7 doesn't have any .NET 5 packages. It's the same underlying issue as Fedora since they all use the same source (https://github.com/dotnet/source-build) as the mechanism for building .NET (Core) packages.
If customers want to use .NET 5 right now on CentOS, Fedora or RHEL, they should probably get it from Microsoft because the other versions are missing or too old.
We (Red Hat and Microsoft) are trying to fix this but it will take a while (probably a few weeks) to resolve completely.
adegeo commentedon Nov 12, 2020
Thanks I'll update these too
mario-d-s commentedon Dec 3, 2020
I'm currently on Fedora 33 but I work on a lot of projects targeting .NET Core 2.1.
I just spent half an hour troubleshooting very weird issues because I had added the Microsoft Yum repo and apparently that recently has started conflicting with the Fedora repo. Long story short I followed the instructions at dotnet/sdk#11533 (comment).
Now I have the
dotnet-sdk-3.1installed from Fedora repo but I can't run any unit test projects as these are targeting 2.1 currently.How can I best get
dotnet-sdk-2.1on my machine too?Edit: answer seems to be at #4655 (comment) (for anyone coming after me).
Now I have to tinker some more with repositories and yum configuration... I hope Microsoft can sort this mess out - I'm sorry for calling it that, but this has not exactly been a pleasant experience. Especially considering that the documentation does not seem to mention any of these caveats, and on top of that 2.1 is officially supported on Fedora 33.
Edit 2:
After following the mentioned instructions, I have successfully installed
dotnet-sdk-2.1, but now it seems impossible to installdotnet-sdk-3.1as well!omajid commentedon Dec 3, 2020
@rbhanda Looks like
dotnet-targeting-pack-3.1is missing from https://packages.microsoft.com/fedora/33/prod/. I see the 5.0 targeting pack there, but not 3.1. Do you know who can fix this?rbhanda commentedon Dec 3, 2020
3.1 packages should be available on https://packages.microsoft.com/fedora/33/prod/ now
mario-d-s commentedon Dec 4, 2020
@rbhanda thanks for the swift intervention, but alas I still have the same problem. If you open the URL in a browser you get an index, and indeed
dotnet-targeting-pack-3.1is still not on there.3 remaining items
mario-d-s commentedon Dec 9, 2020
Thanks for the fix. I was able to install
dotnet-sdk-3.1now.But I would like to know what the plans are for .NET Core in the official Fedora repositories. Core 2.1 has a bit of support in it left, so will it be "migrated"?
To be clear: as a professional .NET developer on Linux, I specifically chose Fedora because it is officially supported by .NET and I like it by far the most between the other choices. But for "officially supported", I found this experience to be quite a bump in the road. The docs are not clear on what is in the official Fedora repo and what needs the MS repo. And even if you do the MS repo, you are going to run into conflicts with the official repo that are not documented either.
I would appreciate if the team still works to smoothen this out further to have a good out-of-the-box experience because I can imagine a lot of people are going through the same trouble.
RheaAyase commentedon Dec 9, 2020
@mario-d-s 2.1 is too old for us to backport A LOT of work that went into being able to properly build dotnet from source. Long story short is, that 2.1 can not be built from source code, and therefor it can not be packaged in Fedora.
Fedora ships 3.1 and will ship 5.0 (which was also not possible to build from source until 3 days ago) Everything around these versions is (will be) in Fedora, you do not need any additional repositories. Simply type
dnf install dotnetand you will get the latest sdk.RheaAyase commentedon Dec 9, 2020
@mario-d-s the recommended way is to not use MS repositories at all, for any version. If you need both 3.1 and 2.1 you can use our copr repository for 2.1 which is compatible with Fedora proper and 3.1 and will work side by side.
The end user can actually google all this - if they only click on the links that say
fedoraproject.orginstead of themicrosoft.comones ;) ;)mario-d-s commentedon Dec 10, 2020
@RheaAyase thanks for the additional info! I will follow your recommendation of switching to the COPR repository. Indeed googling a bit more I could have found this too. I was convinced however that it was Microsoft/.NET that should be supporting Fedora and not the other way around. Goes to show how much hard work the Fedora people are actually doing and it all adds up to what a great distro it is indeed. Thanks for that!
RheaAyase commentedon Dec 10, 2020
5.0 is also in the mentioned copr now
MightyCreak commentedon Jan 10, 2021
I still have some conflicts with the Fedora 33 packages if I try to have both .NET Core 3.1 and .NET 5.0 on my machine (as explained here: https://bugzilla.redhat.com/show_bug.cgi?id=1847206#c9)
Since this issue is closed, does it mean I just need to wait until the Microsoft repo gets updated? Or do I need to do something on my machine so that I can install both?
RheaAyase commentedon Jan 10, 2021
@MightyCreak this is not a bug, it's a well known feature that MS packages are not compatible with open source builds. And there is nothing we can do about it on the open source side. One should simply not combine these two because they're built in completely different way (open source vs binary magic) and they do not install the same way either.
There are two possible solutions should you wish to use 3.1 and 5.0 at the same time:
Using MS packages only (use higher priority on MS repository than Fedora repository)
Using Fedora only packages - 3.1 from the proper repository, and for 5.0 you can enable copr repositories while we're working on releasing it for Fedora proper (tldr building of dotnet from source lags behind release a few months, MS packages use different build pipeline.)
MightyCreak commentedon Jan 10, 2021
That does not work on my machine. There seems to be an issue with the packages priority.
If I do this:
Then I don't have the asp.net core 3.1 runtime, as you can see here I only have the .Net Core and ASP.NET Core 5.0.1:
Here's the list of dotnet and aspnet packages installed:
As you can see, there's a mix of
packages-microsoft-com-prodandupdatespackages. I don't have any copr repo enabled:There might be a way to force the MS repo for all the .NET packages, but I don't know how to do that.
RheaAyase commentedon Jan 11, 2021
Like I said. If you want to use the worse of the two options (a) you need to edit the repo file and increase the priority. (Add
priority = 1for the highest priority, 99 is the lowest.)No you actually do end up having both. Long story short HOST is the executable and is always provided from the highest version of dotnet, so in theory even if you were to install dotnet-sdk-3.1 alone, you would still have HOST package from the 5.0 - it is neither the sdk nor the runtime.
Either way though, you should NEVER install packages from two different sources at the same time. It doesn't matter if it's dotnet, golang, or google chrome. It will always cause problems.
MightyCreak commentedon Jan 11, 2021
I might end up having both, but VS Code didn't want to compile and run my .NET Core 3.1 projects. So, as an end user, it wasn't working.
I agree 200% and that's what I wanted to achieve. I simply didn't know how to prevent this.
I didn't know about the
priority=1trick (I've searched for it since but the only documentation I found was on CentOS: https://wiki.centos.org/PackageManagement/Yum/Priorities). Just out of curiosity, why do you consider this solution "the worse of the two options"?In the end, I tried with
priority=1in the MS repo file and now all the SDKs and all the runtimes are listed as expected, as you can see:RheaAyase commentedon Jan 11, 2021
Because these are proprietary binary blobs built by unknown magic shipped with unknown licensed code inside :P
Fedora packaging requirements guarantee that everything is built from known source, on Fedora and for Fedora. And even all the tools used to build it are also built from known source on Fedora and for Fedora. Which is why it's so difficult to build .NET, historically very closed off platform, the open source way. Even though the source is available, all the tooling used wasn't open until very recently and even now it always lags behind Microsoft's releases.
MightyCreak commentedon Jan 11, 2021
Aaaah, makes much more sense now! 😉
MightyCreak commentedon Jan 11, 2021
Is it planned to add both .net core 3.1 and .net 5.0 in official Fedora packages?
RheaAyase commentedon Jan 12, 2021
3.1 has been in Fedora for really long time (that's why there are conflicts with MS repo) and 5.0 is tracked here: #5596
MightyCreak commentedon Jan 12, 2021
@RheaAyase Subscribed! Thank you!