VS 2019 在向后兼容的异步包中弃用 API
VS 2019 deprecated API in a backwards compatible async package
我们有同步加载的相当旧的 VS 扩展,它派生自 Package 并且 VS 2019 告诉我们我们正在使用已弃用的 API。
问题是我们需要我们的扩展向后兼容 VS 2013-2019。
我发现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所有同步加载的包都不会在 VS 2019 v16.1 中加载。
所以问题是,您是否认为在 VS 2019 上将从 Package 派生的包在没有任何警告的情况下加载异步支持,或者我必须迁移到 AsyncPackage并以两个 VS 扩展结束,因为 VS 2013 不支持 AsyncPackage?
谢谢
VS 2019 抱怨的是 ProvideAutoLoad 属性,而不是您从包中派生的。因此,如果不是绝对需要,只需从包 class.
中删除此属性
根据 these issues on GitHub, especially this one 和我在评论中发布的文章,我假设我真的必须实现 AsyncPackage 并最终得到两个扩展,因为 VS 2013 不支持 AsyncPackage ...希望有人会证明我错了,但现在我将其标记为答案。
我们有同步加载的相当旧的 VS 扩展,它派生自 Package 并且 VS 2019 告诉我们我们正在使用已弃用的 API。
问题是我们需要我们的扩展向后兼容 VS 2013-2019。
我发现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所有同步加载的包都不会在 VS 2019 v16.1 中加载。
所以问题是,您是否认为在 VS 2019 上将从 Package 派生的包在没有任何警告的情况下加载异步支持,或者我必须迁移到 AsyncPackage并以两个 VS 扩展结束,因为 VS 2013 不支持 AsyncPackage?
谢谢
VS 2019 抱怨的是 ProvideAutoLoad 属性,而不是您从包中派生的。因此,如果不是绝对需要,只需从包 class.
中删除此属性根据 these issues on GitHub, especially this one 和我在评论中发布的文章,我假设我真的必须实现 AsyncPackage 并最终得到两个扩展,因为 VS 2013 不支持 AsyncPackage ...希望有人会证明我错了,但现在我将其标记为答案。