“Visual Studio 集成包” vs “Visual Studio Add-in”:有什么区别?

发布于 2024-07-27 00:02:27 字数 131 浏览 3 评论 0原文

为 Visual Studio 创建新扩展时,有两个项目选项:“Visual Studio Integration Package”和“Visual Studio Add-in”。 这两种项目类型之间有什么区别?您何时会使用其中一种而不是另一种?

When creating a new extension for visual studio, there are two project options: "Visual Studio Integration Package" and "Visual Studio Add-in". What is the difference between the two project types and when would you use one over the other?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寒尘 2024-08-03 00:02:28

好的,您可以在此处找到完整的详细比较(有还链接到该系列的前几部分)。

但基本上,从 VS 的第一个版本开始,加载项就作为 VS 扩展类型提供,并构建为 COM 组件。 后来,发现这种方法存在一些局限性,因此创建了新的扩展功能——即 VS SDK 包。

也许,如果您正在构建 VS 2008+ 的扩展,您应该将 VS SDK 包作为更新的技术。 VS 包的另一个优点是与 Visual Studio 更好的集成。

无论您做什么,加载项都是
Visual Studio 的外部事物
VSPackages 是一个完全集成的
IDE 的一部分。

您仍然可以考虑构建一个加载项;

  • 如果您需要访问高级可扩展性 API,而不是 VS 包中提供的低级基本 API,
  • 您使用 Visual Basic 进行开发(VS 包的模板仅在 C# / Visual C++ 中可用);
  • 如果您想要自动执行简单的任务/常见场景,那么加载项可能需要较少的开发工作。

Ok, you can find a full detailed comparison here (there are also links to the previous parts in the series).

But basically, add-ins were available as the VS extension type from the very first versions of the VS and built as the COM components. Later on, some limitations were discovered in that approach, so the new extensibility feature was created -- namely VS SDK package.

Probably, if you are building an extension for VS 2008+ you should target the VS SDK package as the newer technology. Another strong point of the VS package is better integration with the Visual Studio.

Whatever you do, add-ins are an
external thing for Visual Studio while
VSPackages are a completely integrated
part of the IDE.

You still might consider building an add-in, if

  • you need access to high-level extensibility API, as opposed to low-level fundamental API available from a VS package;
  • you develop in Visual Basic (templates for VS Package are available only in C# / Visual C++);
  • you want to automate a simple task / common scenario, then add-in will probably require less development effort.
淡淡的优雅 2024-08-03 00:02:28

关于 Visual Studio 插件与包的重要一点,插件在 VS 2013 中已弃用,并且在 VS“14”中不可用

Visual Studio 2013 中已弃用的加载项
Visual Studio " 14" CTP:加载项已消失

来自 的“官方”指南如何:创建加载项 是“Visual Studio 加载项在 Visual Studio 2013 中已弃用。您应该将加载项升级到 VSPackage 扩展...”

Important point on Visual Studio Add-in vs Package, Add-ins are deprecated in VS 2013 and will not be available in VS "14"

Add-ins Deprecated in Visual Studio 2013
Visual Studio "14" CTP: add-ins are gone

"Official" guidance from How to: Create an Add-In is "Visual Studio add-ins are deprecated in Visual Studio 2013. You should upgrade your add-ins to VSPackage extensions...."

若沐 2024-08-03 00:02:28

集成包是您开始新项目时可以选择的东西(就像您选择 C# 或 VB 一样)。

请参阅http://www.bitwisemag.com/copy/features/dev /visual_studio/vs2005_integration_1.html

加载项的工作方式与 MS Office 应用程序类似。 您可以添加自己的自定义按钮和菜单项。 这是一个示例: http://www.c-sharpcorner.com /UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx

An integration package is something that can be chosen when you start a new project (like how you pick C# or VB).

See http://www.bitwisemag.com/copy/features/dev/visual_studio/vs2005_integration_1.html.

Add-ins work just like they would for MS Office applications. You can add your own custom buttons and menu items. Here is an example: http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文