配置计算机以开发 Office 解决方案Configure a computer to develop Office solutions

若要为 Microsoft Office 创建 VSTO 外接程序和自定义项,请安装 Visual Studio、.NET Framework 和 Microsoft Office 的受支持版本。To create VSTO Add-ins and customizations for Microsoft Office, install a supported version of Visual Studio, the .NET Framework, and Microsoft Office.

软件Software 受支持的版本Supported versions
Visual Studio 2017Visual Studio 2017 与任何版本Office/SharePoint 开发工作负荷。Any edition with the Office/SharePoint development workload.
.NET Framework.NET Framework -.NET Framework 4 或更高版本。- The .NET Framework 4 or later.
Microsoft OfficeMicrosoft Office
  • 任何 Office 套件版本,包括 Office Professional Plus for Office 365。Any suite edition of Office including Office Professional Plus for Office 365.
  • 以下任一独立应用程序:Any of the following standalone applications:

    • ExcelExcel
    • InfoPath(仅 Office 2013 和 Office 2010)InfoPath (Office 2013 and Office 2010 only)
    • OutlookOutlook
    • PowerPointPowerPoint
    • 项目Project
    • VisioVisio
    • Word

Visual Basic for Applications (VBA) 必须作为 Office 的一部分安装。Visual Basic for Applications (VBA) must be installed as part of Office. 重要提示: Office 2010 应用程序的“即点即用”版本不受支持。Important: Click-to-Run versions of Office 2010 applications are not supported.

有关详细的安装步骤,请参阅如何:配置计算机以开发 Office 解决方案For detailed installation steps, see How to: Configure a computer to develop Office solutions.

如果不显示项目模板,或它们不适用于 Visual Studio 中If project templates don't appear or they don't work in Visual Studio

如果你安装受支持的版本的 Visual Studio、.NET Framework 和 Microsoft Office,但是 Office 项目模板不显示在 Visual Studio新的项目对话框中,或收到错误,当尝试使用其中一个,检查以下各项:If you install a supported version of Visual Studio, the .NET Framework, and Microsoft Office, but Office project templates either don't appear in the Visual Studio New Project dialog box, or you receive an error when you try to use one, check the following:

  • 确保你已经在计算机上安装了 Microsoft Office 开发人员工具。Ensure that you have the Microsoft Office developer tools installed on your computer.

    Office 开发人员工具是可选组件的 Visual Studio 中,但它们与 Visual Studio 一起自动安装。Office developer tools are an optional component of Visual Studio, but they are installed automatically along with Visual Studio. 如果通过指定要安装的功能来自定义 Visual Studio 安装,请在安装过程中选择 “Microsoft Office 开发人员工具” 来安装这些工具。If you customize the Visual Studio installation by specifying which features to install, make sure that you choose Microsoft Office Developer Tools during setup to install the tools.

    若要确保安装这些工具,请启动 Visual Studio 安装程序,然后选择修改按钮。To make sure that these tools are installed, start the Visual Studio setup program, and choose the Modify button. 选中 “Microsoft Office 开发人员工具” 复选框,然后选择 “更新” 按钮。Select the Microsoft Office Developer Tools check box, and then choose the Update button.

  • 请确保你未正在运行的即用已传送的 Office 版本。Make sure that you're not running a version of Office that was delivered by Click-to-Run. 请参阅如何:验证 Outlook 是否是一台计算机上的即用应用程序See How to: Verify whether Outlook is a Click-to-Run application on a computer.

  • 确保运行只有一个版本的 Microsoft Office。Ensure that you're running only one version of Microsoft Office.

如果继续遇到问题,请参阅Office 解决方案错误的其他支持If you continue to experience problems, see Additional support for errors in Office solutions.

请参阅See also