0
votes

We have quite old VS extension which is loaded synchronously, it is derived from the Package and VS 2019 is telling us that we are using deprecated API.

The thing is that we need our extension to be backwards compatible with VS 2013-2019.

I have found this example on github which should allow to load a package synchronously on VS 2013 and asynchronously on VS 2015-2019, but i am not sure if this will help us with the warning about using deprecated API and i really want to get rid of this because according to this article all synchronously loaded packages won't be loaded in VS 2019 v16.1.

So the question is, do you think that on VS 2019 will be package derived from Package with async support loaded without any warnings or i must migrate to AsyncPackage and end up with two VS extensions, because the AsyncPackage is not supported in VS 2013?

Thanks

2
How many users do you have that are stuck on VS2013? Is this really a problem for your users, or is there some out-of-date directive that you MUST support old development systems (even if no-one uses them!) - Neil
Create two dll's. One with AsyncPackage for Studios from VS2017. And another dll for old Studios with Package (VS2012-VS2015). - vik_78
you're safe to use IAsyncLoadablePackageInitialize. I've asked this Microsoft some time ago. For VS2019 it will be always supported. - magicandre1981
Hi, any update for this issue? If the Sergey's answer is helpful for you, please consider marking it as answer, it will be beneficial to other community members which has the similar issue. Just a reminder:) – - LoLance
Hello, sorry for the delay, i am now on vacation. I will give it a try next week. Thank you all for your answers. - Luboš Balůsek

2 Answers

1
votes

It is ProvideAutoLoad attribute that VS 2019 is complaining about, not that you derive from the Package. So, if not absouletely required, just remove this attribute from the package class.

1
votes

According to these issues on GitHub, especially this one and article i have posted in the comment i assume that i really must implement AsyncPackage and end up with two extensions, because AsyncPackage is not supported in VS 2013... hoping that someone will prove me wrong, but for now i am marking this as answer.