4

In Rider I'm trying to create net5.0 console application. But, the dropdown for selection .net version is disabled. console app window

I don't understand why, because I can select .net framework version, for example: selection is ok

And my sdk is fine, if I create a new folder and type into terminal dotnet new console -f net5.0 the template loads successfully. I can't use it, because Rider doesn't recognize it as a project and thinks it's a simple folder, so I can't use Rider's dependencies tab for example. Also, manually changing .net version in project properties is not an option, because the template remains as top-level statements and global usings remain, which gives compile errors. Question: how to be able to freely and easily select .net version when creating a project?

UPD

I can create a project for net6.0, then open it in terminal and rewrite its contents using dotnet new console --force -f net5.0 (and it seems to work fine for Rider), but I would still like to know if I can enable choosing framework version from that dropdown

  • What version of Rider is it? – ChiefTwoPencils Dec 30 '21 at 20:52
  • @ChiefTwoPencils 2021.3.2, the one with net6.0 support – Sviatozar Petrenko Dec 30 '21 at 20:55
  • Hmm, I'm running 2021.3.1 and I have an SDK config that I can "Change" to target a different one. Doing so then changes to corresponding Framework but it stays disabled itself. So, it's forcing the Framework. I only have Core 3 installed so I couldn't verify with 5 though. – ChiefTwoPencils Dec 30 '21 at 21:07
  • What does `dotnet --list-sdks` give you? – ChiefTwoPencils Dec 30 '21 at 21:10
  • @ChiefTwoPencils 5.0.201 [C:\Program Files\dotnet\sdk] 5.0.401 [C:\Program Files\dotnet\sdk] 6.0.100-rc.2.21505.57 [C:\Program Files\dotnet\sdk] 6.0.100 [C:\Program Files\dotnet\sdk] – Sviatozar Petrenko Dec 30 '21 at 22:24
  • @ChiefTwoPencils if I understand you correctly, I have the same option but only when I click "New.." in file menu. But it forces to create a new solution. Does this mean Rider supports only solution-wide framework version? – Sviatozar Petrenko Dec 30 '21 at 22:28
  • Rider uses the same .NET SDK in this wizard which is used for loading/building current solution. Just change SDK for the current solution (select solution node in the solution explorer and choose `manage .net SDK` in the context menu) and you will be able to create project from that SDK templates. – xtmq Dec 30 '21 at 22:48
  • 1. You have all required bits to create a .NET 5 project on this machine, so not sure why Rider blocks that. But you can learn that from JetBrains directly, https://youtrack.jetbrains.com/issues/RIDER 2. As a Current release, .NET 5 is going away (end of life in a few weeks) so it makes some sense to only create .NET 6 projects at this moment. – Lex Li Dec 30 '21 at 23:08
  • 2
    It seems to be a bug: https://youtrack.jetbrains.com/issue/RIDER-70004 – Korfu Jan 29 '22 at 18:55

0 Answers0