dotnet / vscode-dotnet-runtime

VSCode Extension for Installing .NET via VS Code
MIT License
128 stars 229 forks source link

Add API option to check version matches less strictly #1858

Open nagilson opened 4 days ago

nagilson commented 4 days ago

Is your feature request related to a problem? Please describe.

When making an API call and a generic version is given such as 8.0 we must resolve this using the server to a more specific version. We then check our existing installs to see if that version is available.

A clear and concise description of what you want to happen. Include any alternative solutions you've considered.

This would be part of IDotnetAcquireContext as the option boolean, which is undefined/false by default, as allowAlternativeVersions.

Describe the solution you'd like

If the user is offline but had installed .NET successfully before then we should not fail. The best way to do this would be to add an optional flag to our API (to prevent breaking others who may rely on this expectation of only accepting the latest .NET install) that would skip the online check for versions and just accept any version as a match that has the same major.minor.

Additional context

No response

nagilson commented 4 days ago

See https://github.com/microsoft/vscode-dotnettools/issues/1028