Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show a prompt if we have more than one solution file #6132

Merged

Conversation

jasonmalinowski
Copy link
Member

This prompt is pretty close to what DevKit does in this same case.

This prompt is pretty close to what DevKit does in this same case.

if (chosen) {
if (chosen.open) {
vscode.commands.executeCommand('dotnet.openSolution');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want to update the property or no like Dev Kit? We've been seeing feedback where people do have multiple solutions and might be confused if this does change it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dibarbet had the idea of just adding a third button. With some wordsmithing I think I got them all to fit.

),
{ title: vscode.l10n.t('Choose'), action: 'open' },
{ title: vscode.l10n.t('Choose and set default'), action: 'openAndSetDefault' },
{ title: vscode.l10n.t('Do not load any'), action: 'disable' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other option:
'Disable load'

'Your workspace has multiple Visual Studio Solution files; please select one to get full IntelliSense.'
),
{ title: vscode.l10n.t('Choose'), action: 'open' },
{ title: vscode.l10n.t('Choose and set default'), action: 'openAndSetDefault' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other option:
'Choose default'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that but decided to make it a bit clearer the second button is first button plus something more. But if we have to save room this would proably be where I'd do it.

@jasonmalinowski jasonmalinowski self-assigned this Aug 15, 2023
@jasonmalinowski jasonmalinowski merged commit 29620d9 into dotnet:main Aug 15, 2023
3 of 4 checks passed
@jasonmalinowski jasonmalinowski deleted the make-multiple-solutions-friendlier branch August 15, 2023 17:05
@@ -425,6 +425,32 @@ export class RoslynLanguageServer {
if (solutionUris) {
if (solutionUris.length === 1) {
this.openSolution(solutionUris[0]);
Copy link
Member

@genlu genlu Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I'm a bit late to the party. Since we are trying to improve this area, could we also show the solution picker if default solution can't be opened and there's other solution files in the hierarchy?

[Error - 1:58:27 PM] [LanguageServerHost]Microsoft.Build.Exceptions.InvalidProjectFileException: The project file could not be loaded. Could not find file 'c:\Users\gel\source\repos\ConsoleApp16\ConsoleApp16.sln'. c:\Users\gel\source\repos\ConsoleApp16\ConsoleApp16.sln

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@genlu We could, although I'm still curious how you got an error like that in the first place. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin stopped working with upgrade to 2.0.x
3 participants