Ancestors

Toot

Written by Keith Wagner :csharp: on 2024-12-13 at 13:56

Hey #dotnet developers, how do you uninstall the .NET 9 SDK. It’s causing compatibility issues with one of my projects and I can’t seem to uninstall it without breaking Visual Studio and Rider.

As an FYI, I still have .NET 6 and 8 installed, so I would figure they should fall back to that.

=> More informations about this toot | More toots from kpwags@hachyderm.io

Descendants

Written by Andy on 2024-12-13 at 14:10

@kpwags have you tried creating a global json for your project? That should control which SDK version is used for the project. https://learn.microsoft.com/en-us/dotnet/core/tools/global-json

=> More informations about this toot | More toots from adeese@hachyderm.io

Written by simendsjo on 2024-12-13 at 14:23

@adeese @kpwags Andys workaround should work. The issue (on Windows at least) is that the dotnet executable will be replaced with the latest version you install. But dotnet.dll and hostfxr.dll still exist for all installed versions, so the global.json approach should be able to use the correct version (for most parts).

=> More informations about this toot | More toots from simendsjo@fosstodon.org

Written by Keith Wagner :csharp: on 2024-12-13 at 14:34

@simendsjo The global.json approach worked for the CLI, but it’s still broken for VS and Rider

=> More informations about this toot | More toots from kpwags@hachyderm.io

Written by simendsjo on 2024-12-13 at 14:40

@kpwags For Rider, you can point it to the dotnet.dll in a specific dll instead of the "latest dotnet.exe" which is the default. E.g. like the following image

=> View attached media

=> More informations about this toot | More toots from simendsjo@fosstodon.org

Written by Keith Wagner :csharp: on 2024-12-13 at 14:45

@simendsjo That then unloads all the projects in the solution and fails to load them saying the Microsoft.NET.Sdk.Web could not be found

=> More informations about this toot | More toots from kpwags@hachyderm.io

Written by simendsjo on 2024-12-13 at 14:49

@kpwags You're setting the path to an net8 dotnet.dll and your project has TargetFramework net8.0? Sounds like it's trying to load a version it cannot find. I haven't needed to manipulate Rider like this before, only used the latest + global.json.

=> More informations about this toot | More toots from simendsjo@fosstodon.org

Written by Keith Wagner :csharp: on 2024-12-13 at 14:51

@simendsjo Yup, I suspect I’m doing things that aren’t meant to be done. Just wish it was easier to remove .NET 9.

I have a workaround to allow it to work with .NET 9, but it will force the rest of my team to update their machines, and possibly our pipelines as well. I’m trying to avoid that.

=> More informations about this toot | More toots from kpwags@hachyderm.io

Written by Joel Bennett on 2024-12-13 at 15:44

@kpwags After you uninstall 9, did you reinstall 8?

=> More informations about this toot | More toots from jaykul@fosstodon.org

Written by Keith Wagner :csharp: on 2024-12-13 at 14:33

@adeese That worked for the CLI, but it didn’t work for VS or Rider

=> More informations about this toot | More toots from kpwags@hachyderm.io

Written by Khalid Pro Max⚡️ on 2024-12-13 at 15:27

@kpwags @adeese Rider should pick up the global.json file. Make sure it is at the root of your solution. Right-click the solution and choose "Manage SDK" at the bottom.

=> View attached media

=> More informations about this toot | More toots from khalidabuhakmeh@mastodon.social

Written by Keith Wagner :csharp: on 2024-12-13 at 16:36

@khalidabuhakmeh @adeese That actually got it to work.

Thanks so much, I really appreciate it

=> More informations about this toot | More toots from kpwags@hachyderm.io

Written by Khalid Pro Max⚡️ on 2024-12-13 at 16:48

@kpwags @adeese Awesome! Yeah, the global.json file is finicky. I joke that it's the cause of and solution to all your #dotnet problems.

=> View attached media

=> More informations about this toot | More toots from khalidabuhakmeh@mastodon.social

Written by Derek Price on 2024-12-13 at 15:10

@kpwags Maybe @khalidabuhakmeh has some ideas for #Rider

=> More informations about this toot | More toots from dprice@fosstodon.org

Written by Khalid Pro Max⚡️ on 2024-12-13 at 15:25

@dprice @kpwags I would recommend deleting your dotnet install directory and reinstall the SDKs again. Run a dotnet --list-sdks command and it will tell you where the SDKS are installed. You could try just deleting the .NET 9 one first.

=> View attached media

=> More informations about this toot | More toots from khalidabuhakmeh@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113645859686773471
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
3014.119693 milliseconds
Gemini-to-HTML Time
6.408095 milliseconds

This content has been proxied by September (ba2dc).