-
-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The VS.Services.GetCommandServiceAsync() method does not seem to ever work because the service is never found.
I don't know why, but it seems that the IMenuCommandService can only be retrieved from a Package and not from the global service provider.
IMenuCommandService fromGlobal = await VS.GetServiceAsync<IMenuCommandService, IMenuCommandService>();
IMenuCommandService fromPackage = await this.GetServiceAsync<IMenuCommandService, IMenuCommandService>();
// `this` is a Package object.
await VS.MessageBox.ShowAsync(
"From Global: " + ((fromGlobal is null) ? "null" : "not null") + "\r\n" +
"From Package: " + ((fromPackage is null) ? "null" : "not null")
);Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
