Open amsoedal opened 2 months ago
Whereas a .NET Runtime is installed to support running our LSP, having a .NET SDK is needed for building/loading user projects.
We need to handle this scenario better and to provide an actionable error message to the user.
Adding on to this
I would expect the extension to restore the missing dotnet binary at activation time and continue to function as normal.
We do not plan on supporting SDK installation from within C# extension. Choosing, finding, and installing the right SDK isn't necessarily straightforward, and not something we want to manage on the extension side.
Recent versions of the .NET Install Tool extension have added an entry point to install an SDK from within VSCode, however it still requires going through a separate installer (and potentially elevation). A similar entrypoint also exists in C# Dev Kit.
Leaving this issue open though, since as @JoeRobich mentioned we should provide a better error message when an SDK is not present.
Environment data
dotnet --info
output: N/A VS Code version: 1.89.0 C# Extension version: v2.23.15OmniSharp log
Steps to reproduce
Expected behavior
My team is developing a new VS Code extension and we want to take a dependency on the C# extension to execute dotnet commands on the user's project. I was testing what would happen if a user doesn't have dotnet pre-installed on the machine. I would expect the extension to restore the missing dotnet binary at activation time and continue to function as normal.
Actual behavior
Even though it looks like the extension puts dotnet in the globalStorage\ms-dotnettools.vscode-dotnet-runtime folder, I consistently get the error shown above and am unable to debug my project.
Additional context
N/A