dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
138 stars 252 forks source link

Add information about failures to the return result of `dotnet.acquire` #674

Open anthony-c-martin opened 1 year ago

anthony-c-martin commented 1 year ago

My team owns the Bicep extension, which depends on this extension to acquire dotnet. We're often getting reports of issues with this extension, which have different root causes (some user error, some genuine bugs).

This isn't very clear to our users, so issue reports often get muddled up, or do not contain the relevant information. I've dug around, and can't find any way to obtain information from within the extension calling dotnet.acquire to understand why the acquisition failed. Would it be possible to return information during failures from this command to give an enum or short description of the failure? This would help us more quickly root cause and differentiate different types of failures.

Here's an example of how we're currently using this extension: https://github.com/Azure/bicep/blob/984361eba389b5fd7ccb2e3fb1a3a0512f68d17b/src/vscode-bicep/src/language/client.ts#L156-L172

ambroyz commented 1 year ago

I join the request, because I can not understand what is wrong.

Downloading the .NET Runtime.
Downloading .NET version(s) 6.0.20 .......................................................................................................................... Error!
Failed to download .NET 6.0.20:
.NET installation timed out.

 Error!
.NET Acquisition Failed: Installation failed: Error: .NET installation timed out.
ps2goat commented 1 year ago

I received the same error as above, running Windows 11 + vscode connected to Ubuntu via wsl2. I had the latest sdk installed via the MS package repo Runtime: Microsoft.NETCore.App 7.0.9 SDK: 7.0.306 (latest when I got it)

Everything worked fine on the Windows side, same code and everything but I used the Windows version of the sdk installer.

What seems to have fixed it is updating the C# extension in WSL by viewing the extension and clicking "Switch to Release version". Reloaded the environment and now it's working.

nagilson commented 1 year ago

@baronfel this is a first party team feature request and aligns with your idea of letting consumers subscribe to our events. You may want to talk more with this team