Creating new project in vscode
Could someone please help me understand why this is?
Whenever I try to create a new .Net app in vscode with the command palette, it has to download a new .net runtime even though I have .net 8 runtime installed. Running Ubuntu 22.04
12 Replies
Odd that it would try to download 7.x when you have 8.x installed
What happens when you create the project via CLI?
Seems like you might need to edit VS Code settings and explicitly point DevKit to the SDK, runtime, and all that jazz: https://github.com/microsoft/vscode-dotnettools/issues/562
When I create the project with cli, the download still happens.
The problem I have now is the download always fails and this was not the case few months ago. I don't know what's wrong with the extension. I just read through the issue on github and it seems I looks like lot of tweaking which I don't wanna get into. I'll try reinstalling the extension and see the outcome
what command are you using?
I dont think I see it in any of the screens
I used the command pallete. I've also tried the cli with 'dotnet new' command. Same download process starts and fails after many minutes
what if u do
dotnet new console -f net8.0
Yes tried that pls. The application gets generated but the download starts in the output window and fails later. IntelliSense and autoCompletion don't work.
yeah im not sure sorry I've seen some issues of people with linux have that but no solutions
Odd that it would try to download 7.x when you have 8.x installedThis is because the shipped bits run on 7, although they should be updated to 8 soon. Likely https://github.com/dotnet/vscode-dotnet-runtime/issues/1263#issuecomment-1687440024 is the fix you're looking for. The extension uses dotnetAcquisition to make sure it can run the LSP server bits for the extension. I don't know if it's intentional that there's a specific major version requirement, but it might be. I'd have to look further for an issue on that
GitHub
Downloads .net Runtime fails · Issue #1263 · dotnet/vscode-dotnet-r...
VSCode always downloads.net Runtime 7.0.10 when it starts. Found because the c# Dev kit extension is installed. Disable the c# Dev kit and it will no longer download. If installing the extension c#...
There are also some troubleshooting tips at https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime
.NET Install Tool - Visual Studio Marketplace
Extension for Visual Studio Code - This extension installs and manages different versions of the .NET SDK and Runtime.
I've tried these solutions but didn't work for me. Only thing that worked was disabling the dev extension and leaving the c# language extension only
Thanks btw
ah, make sure to file feedback on the dev extension then please 🙂 I'm sure they'll want to know that this scenario is broken for you
Alternatively, I'd give Rider a shot
It's paid, but free for students and OSS maintainers
The EAPs are also free, and one is currently underway