Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio Office 2016附加模块在Visual studio 2013中的开发_Visual Studio_Vsto_Ms Office - Fatal编程技术网

Visual studio Office 2016附加模块在Visual studio 2013中的开发

Visual studio Office 2016附加模块在Visual studio 2013中的开发,visual-studio,vsto,ms-office,Visual Studio,Vsto,Ms Office,我们需要为Office 2016开发外接程序。我们正在使用Visual studio 2013。它仅显示Office 2013加载项模板。是否可以从Visual studio 2013创建Office 2016附加模块?如果是这样,请告诉我步骤。您需要VS 2015来获取Office 2016的具体模板。VSTO仅为“当前”版本的Office提供模板 如果安装了Office 2013,则可以为其开发外接程序。在Office 2016中安装和运行它应该没有问题-除非您想使用2016年特有的技术。在

我们需要为Office 2016开发外接程序。我们正在使用Visual studio 2013。它仅显示Office 2013加载项模板。是否可以从Visual studio 2013创建Office 2016附加模块?如果是这样,请告诉我步骤。

您需要VS 2015来获取Office 2016的具体模板。VSTO仅为“当前”版本的Office提供模板

如果安装了Office 2013,则可以为其开发外接程序。在Office 2016中安装和运行它应该没有问题-除非您想使用2016年特有的技术。在这种情况下,您可以对2016特定部分使用后期绑定(PInvoke),但调试/测试会有点麻烦

您可以下载免费的Visual Studio 2015社区版()以及VSTO包():VSTO确实集成到2015版(以及2013版)的社区版中。当然,许可证限制也会适用


除此之外,您还需要升级到VS 2015的完整版本。

是的,这是可能的。在Visual Studio 2013中创建的加载项可以在Office 2016中运行。你可以在这篇文章中了解更多


如果您需要使用Office 2016中提供的新方法和属性,您可以使用反射机制(请参阅)。

您可以在VS2013中开发和运行Office 2016插件。无需升级到VS2015

  • 为VS2013安装VSTO 4.0扩展
  • 使用Visual Studio模板创建Office 2013插件
  • 打开项目文件并将ProjectExtensions部分中的office版本字符串“15.0”替换为“16.0”。查找要编辑的类似字符串:

    OfficeVersion=“15.0”VstxVersion=“4.0”ApplicationType=“Outlook”Language=“cs”TemplatesPath=”“DebugInfoExeName=“#Software\Microsoft\Office\15.0\Outlook\InstallRoot\Path#Outlook.exe”


  • 有一个Outlook的例子,我在Excel中试用过,效果也不错

    我的例子是:

    <ProjectProperties HostName="Excel" HostPackage="{29A7B9D7-A7F1-4328-8EF0-6B2D1A56B2C1}" OfficeVersion="16.0" VstxVersion="4.0" ApplicationType="Excel" Language="vb" TemplatesPath="" DebugInfoExeName="#Software\Microsoft\Office\16.0\Excel\InstallRoot\Path#excel.exe" DebugInfoCommandLine="/x" AddItemTemplatesGuid="{DCFE8D25-4715-4C33-9EAB-A34A9EBC9544}" />
    

    以及Excel的路径

    #Software\Microsoft\Office\16.0\Excel\ 
    

    最后,它将在Excel 2016中启动…

    但是,我们无法在office 2016中调试外接程序。我必须升级我的VisualStudio。它很有魅力。构建和调试都可以正常工作。这应该被接受。另外,要修改的文件是xxx.vbproj(如果它是一个vb项目),您是否能够使用VS 2013针对Office 2016调试您的解决方案?
    OfficeVersion="16.0"
    
    #Software\Microsoft\Office\16.0\Excel\