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

GetSelectionAsync does not return non-code type document references. #458

Open
aesalazar opened this issue Sep 23, 2023 · 0 comments
Open

Comments

@aesalazar
Copy link

aesalazar commented Sep 23, 2023

I am trying to write an extension that obtains the current active Document Tab using

var solutionExplorer = await VS.Windows.GetSolutionExplorerWindowAsync();
var selections = await solutionExplorer.GetSelectionAsync();

Using this repo as an example: https://github.com/aesalazar/AsteroidsWasm

image

If I have the launchSettings.json file active, the method returns a proper reference to it. However, if I have the favicon.ico active, the call does not return it. It seems to return the last-selected non-image (among others?) file. In the above it, it will continue to return launchSettings.json.

Is this a known limitation of the method?

Thanks!
Ernie

@aesalazar aesalazar changed the title GetActiveDocumentViewAsync does not return non-code type document references. GetSelectionAsync does not return non-code type document references. Sep 23, 2023
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

No branches or pull requests

1 participant