Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Crash by exception when using the non-obsolete constructor of SuggestedActionSet #20

Open
LaraSQP opened this issue Dec 19, 2019 · 2 comments
Assignees
Labels

Comments

@LaraSQP
Copy link

LaraSQP commented Dec 19, 2019

Attached is a sample solution (including the ActivityLog.xml detailing the crash) which has been created by following to the letter the instructions in:

https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/extensibility/walkthrough-displaying-light-bulb-suggestions.md

When using the obsolete constructor (line 90 in TestSuggestedActionsSource.cs), the extension behaves as expected.

When commenting out line 90 and using the non-obsolete constructor in line 91, the extension will throw an exception and crash VS when invoked via the keyboard shortcut.

LightBulbTest.zip

Although unrelated to this particular issue, you guys might want to include a comment somewhere that, when using nested actions in the 'Quick Actions' menu (i.e., effectively, submenus), the return collection in GetActionSetsAsync must apparently be 'Immutable'. Otherwise, undecipherable crashes take place.

@olegtk
Copy link
Member

olegtk commented Dec 19, 2019

thanks for reporting this, @LaraSQP, investigating.

@olegtk olegtk self-assigned this Dec 19, 2019
@olegtk olegtk added the bug label Dec 19, 2019
@olegtk
Copy link
Member

olegtk commented Dec 19, 2019

@gundermanc

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

No branches or pull requests

3 participants