-
Notifications
You must be signed in to change notification settings - Fork 364
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
Find In Solution Explorer throws error if Track Active Item is enabled #290
Comments
Thanks for reporting the issue. This command used to be a custom implementation, but became a pass-through invocation to a now native capability of VS. We do have a little remaining logic that makes the command more robust than native. Can you please try the following?
alternatively you can click the "Sync with Active Document" button in the solution explorer toolbar (two arrows pointing in opposite directions). |
Thanks for the feedback. After doing some testing, it seems the issue only occurs when Tools > Options > Projects and Solutions > General > Track Active items in Solution Explorer is enabled. Maybe you could consider hiding the Find In Solution Explorer menu item when this option is enabled to prevent the error? |
Aha, thanks for the clarification. I have reproduced the issue as well now when that setting is enabled and that makes sense. In this scenario, perhaps if the command is invoked we could just activate the solution explorer window? The net behavior then would be the same between both modes, the solution explorer has focus and the current document is highlighted. Thoughts? |
Good suggestion! I think that would produce the desired behaviour. |
Cool, we'll plan on that. Thanks! |
…when Track Active Item is selected.
I've made a change that I believe will handle this scenario. If you would like to test it out a build will be available in our CI channel shortly (v10.1.99 or higher). |
I just tested the v10.199 build and I don't get the error any more when I click Find in Solution Explorer. The only issue remaining is that, when the solution explorer gains focussed, it does not highligth the correct file (in my current solution it switches to a folder called Solution Items). |
Thanks for confirming the error is no longer seen. Since you're using the native document tracking, that replaces the logic that would normally highlight the correct file. We are now only invoking the solution explorer when tracking is enabled because the command that finds the correct item cannot be used while tracking is active. FWIW I have noticed that behavior if you have a document open that is not a part of the solution. |
Marking this as closed as we prepare for a next release. |
Environment
Description
When selecting the Find In Solution Explorer command in the right-click menu of a Code Editor window, the following error is thrown:
Steps to recreate
Current behavior
Above error message is shown.
Expected behavior
File is found in Solution Explorer.
The text was updated successfully, but these errors were encountered: