tunnelvisionlabs / FindInSolutionExplorer

Adds the Find in Solution Explorer command to the context menu of open document tabs.
https://marketplace.visualstudio.com/items?itemName=SamHarwell.FindinSolutionExplorer
Apache License 2.0
16 stars 5 forks source link

VS 2019 gives a warning that this Extension uses a depricated API #17

Open dparvin opened 5 years ago

dparvin commented 5 years ago

When I have this Extension loaded in the latest VS 2019 (in this case Preview 4.1, but it will happen in RC.1 as well because they are the same bits) I get a warning that says I have some Extensions that are using a deprecated API. There is a link to Synchronously autoloaded extensions page that talks about the problem. The extension seems to work great in VS 2019, but for this one thing. If at some point they stop supporting this API, this extension will stop working.

sharwell commented 5 years ago

@dparvin This is a bug in Visual Studio 2019. The APIs the IDE is claiming are required do not exist in the context of this extension, so there is no way to adopt them.

/cc @madskristensen

dparvin commented 5 years ago

Ok, cool, thanks.

rfennell commented 5 years ago

I am seeing the same issue on one of my (extensions. Given the comments above from @sharwell am I ok in ingoring the warning?

sharwell commented 5 years ago

@rfennell send me a message on gitter Monday and we can see if there's a different way to handle it for your extension.

tb-mtg commented 5 years ago

Below may help?

Extension authors can find instructions for migrating packages to asynchronous autoload at Migrate to AsyncPackage.

sharwell commented 5 years ago

@tb-mtg See https://github.com/tunnelvisionlabs/FindInSolutionExplorer/issues/17#issuecomment-469923759

dsparkplug commented 5 years ago

Visual Studio 16.1 won't load this extension by default, unless you allow depreciated API usage. Doesn't this just require basing the FindInSolutionExplorerPackage class on AsyncPackage rather than Package and then overriding InitializeAsync() instead of Initialize() so that the package loads asynchronously?

sharwell commented 5 years ago

@dsparkplug there is no AsyncPackage in Visual Studio 2012, which this extension supports.

dsparkplug commented 5 years ago

Does it really need to support VS 2012 in 2019?

Or maybe the extension could be split into two packages one supporting 2019 and another supporting earlier versions. See this stack overflow answer for further discussion on this.