Support for the Upcoming .NET SDK 6.0

The latest Rider 2021.3 EAP builds support .NET 6 SDK. Please download them from https://www.jetbrains.com/rider/nextversion/

18 comments
Comment actions Permalink

Hello Alexander

I had .NET SDK 6.0-preview installed on my PC for one day to try something out with Visual Studio Preview Edition. Having quickly decided I was not interested after all, I uninstalled it.  As you can see, it is gone:

But when I open an existing .NET 5.0 solution in Rider 2021.1.1, I get this event log message:

.NET SDK 6.0.100 is not fully supported in Rider
Some IDE features may not work

Below the message is a link for Manage SDK. I clicked that, and a 'Manage .NET / .NET Core SDK for Solution' dialog box is shown:

I changed the SDK version to 5.0, like this, and clicked OK:

I then closed Rider and restarted it.  The event log message was displayed again. And when I clicked Manage SDK again, the version had reverted to 6.0.

I can see that, as a result of changing the SDK version in the dialog box a file global.json has been added to my solution folder with the following contents:

{
"sdk": {
"version": "5.0",
"rollForward": "latestMajor",
"allowPrerelease": false
}
}

However, storing this information failed to stop the event log message from being shown again when I reopened Rider.  That's one problem.

The other related problem is that Rider warns me about .NET SDK 6.0 even though I uninstalled it.  Evidently, even though the SDK has been uninstalled, it has left some trace that Rider is picking up.

Fortunately, no harm has been done to my solution.  Its projects all still know they are .NET 5.0, and a clean build of the solution worked fine and all the unit tests still pass.

I know I can tell Rider not to show me that event log message again.  For now, I shall not do so, pending your comments.

Cheers,

Simon

 

1
Comment actions Permalink

Hello Simon! 

Thanks for contacting us. 

Could you please run the dotnet --version command in CMD? What version will it show? 

Thanks! 

0
Comment actions Permalink

Hello Alexander,

The dotnet --version command gave this error message:

Found .NET SDK, but did not find dotnet.dll at [C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5\dotnet.dll]

I searched for "Found .NET SDK, but did not find dotnet.dll at" and found a fix at https://github.com/dotnet/sdk/issues/6180. As you may know, it's a known problem where uninstalling an SDK can sometimes leave a folder "C:\Program Files\dotnet\sdk\[VERSION]".  In my case there was a folder 'C:\Program Files\dotnet\sdk\6.0.100-preview.3.21202.5' containing only one file, EnableWorkloadResolver.sentinel. 

Following the advice in the thread, I deleted the folder.  The dotnet --version command now shows "5.0.201", as expected.

To test Rider, I also deleted global.json from the solution folder.  The problem is fixed.  Rider no longer shows the event log message. Evidently that leftover sdk version folder (or perhaps the one file within it) was the trace of the uninstalled SDK that Rider had previously been picking up.

Thanks for your help!

Simon

Edited by Simon O'Rorke
1
Comment actions Permalink

Hello Simon! 

Thanks a lot for sharing the investigation result with us! That's great to hear you found out the root of the problem and fix that. 

Thanks! 

0
Comment actions Permalink

Hello Alexander

If I run dotnet --version in solution root with the global.json file written by rider ( with "version": "5.0" in it ) then the result is 6.0.100-preview.5.21302.13.

If I change it to "version": "5.0.301" then the result is 5.0.301 but Rider still displays the warning about unsupported SDK version and the dialog still shows version 6.0

1
Comment actions Permalink

HI, Jan

Maybe you can check the Settings -> Build, Execution, Deployment -> Toolset and Buid to see what is your .Net Core Cli execution path and MSBuild version Setting. It can be set to .net core 6 for some reason. 

1
Comment actions Permalink

What worked for me was changing the Roll-forward policy to "major". 
And selecting version 5, of course.

Edited by Aneudy Motacatalino
0
Comment actions Permalink

This is work for me


1. I uninstalled visual studio 2022

2. Removed folder  C:\Program Files\dotnet\sdk\6.0.100-preview

Edited by Wangruifei
0
Comment actions Permalink

Microsoft has released the .NET 6 already, it's not preview, it's LTS.

https://devblogs.microsoft.com/dotnet/announcing-net-6/

Is there any guidelines on how to use it with Rider until it's fully supported? Or any estimation on when we may be able to safely upgrade if we develop with Rider? Thanks

19
Comment actions Permalink

We are also interested in .NET 6. Any ETA for official support?

 

20
Comment actions Permalink

Also would like to know what is the estimation on when Rider will support it. It's annoying having to use VS :)

18
Comment actions Permalink

What is the ETA on this, please? .NET 6 is already in production. Our team opted to go for Rider over Visual Studio, and paying licenses for both IDEs is not an option. I'd hate others to use this as an argument to go back to Visual Studio.

4
Comment actions Permalink

Rider 2021.3 EAP already works well with NET6.
Regarding the release dates - https://twitter.com/maartenballiauw/status/1458447535350165511

0
Comment actions Permalink

This may or may not have an impact on Rider if it uses the command line to interact with dotnet.

One system wide issue I had on windows 10 pro was when trying to build a dotnet app from the command line. Build was unrecognized and dotnet --info reported nothing under the sdk section, despite having installed vs2022 (after uninstalling vs2019). Resolving this was simple once the cause was discovered, in the env path  C:\program files\dotnet  must come before C:\program files (x86)\dotnet. 

0
Comment actions Permalink

Great news! Thanks for the update!

One question about EAP (never used it before). If I don't do a Silent uninstall, will I lose all my settings? Or do they get migrated to EAP before they are deleted from the old version directory?

Edited by Eu11111
0
Comment actions Permalink

After installing VS22 and .NET 6, I can not create a new MVC project with .NET 5 and Framework is grayed out,

Also in Toolset I don't see any MSBuild targeting to .NET 5.



Edited by V.Cheshmy
1
Comment actions Permalink

Please report this issue with Help - Report a Bug, agree to attach logs.

0
Comment actions Permalink

Will we eventually get hotreload during debug in Linux?

I am very much enjoying the hotreload feature, it makes dev so much quicker when working with ui elements.

0

Please sign in to leave a comment.

Have more questions?

Submit a request