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
@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
@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
@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
@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
=> More informations about this toot | More toots from simendsjo@fosstodon.org
@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
@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
@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
@kpwags After you uninstall 9, did you reinstall 8?
=> More informations about this toot | More toots from jaykul@fosstodon.org
@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
@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.
=> More informations about this toot | More toots from khalidabuhakmeh@mastodon.social
@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
@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.
=> More informations about this toot | More toots from khalidabuhakmeh@mastodon.social
@kpwags Maybe @khalidabuhakmeh has some ideas for #Rider
=> More informations about this toot | More toots from dprice@fosstodon.org
@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.
=> More informations about this toot | More toots from khalidabuhakmeh@mastodon.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini