问题描述
Visual Studio 2012似乎不支持Office 2007(它仅具有Office 2010的项目模板).如果要创建与Office 2007兼容的加载项,是否需要使用Visual Studio 2010,或者是否可以使用VS 2012进行简便的操作?
Visual Studio 2012 does not appear to support Office 2007 (it only has project templates for Office 2010). If I want to create an add-in compatible with Office 2007, do I need to use Visual Studio 2010, or is there a simple way to do it with VS 2012?
如果VS 2012中有 种方法可以做到这一点,那么这样做是否有任何限制/优势等?
If there is a way to do it in VS 2012, are there any restrictions/advantages, etc. in doing so?
推荐答案
您可以在 Office 2007 上使用 VS 2012 .首先创建一个 Outlook 2010加载项,然后修改项目文件( .csproj ),以使其在Office 2007中打开,并且在运行时不查找Office 2010.
You can get VS 2012 working with Office 2007. First create an Outlook 2010 Add-In and modify the project file (.csproj) so that it will open in Office 2007 and not look for Office 2010 when run.
这是项目设置更改( Outlook示例):
Here is the project settings change (Outlook example):
源XPath:
旧值(Office 2010):
新价值(Office 2007):
更改此项目设置后,启动调试器()时,它将加载Outlook 2007应用程序,而不是查找Outlook2010.
After changing this project setting, when you fire up the debugger () it will load the Outlook 2007 application instead of looking for Outlook 2010.
使用VS 2012进行Office开发的主要缺点之一是部署现在使用InstallShield LE而不是Visual Studio安装项目.这是一个重大转变,但. WiX是替代安装程序,但我还没有尝试过. WiX( Windows Installer XML )仍然缺少InstallShield LE或VS 2010安装项目中提供的UI.
One of the major drawbacks to using VS 2012 for Office development is that deployment is now using InstallShield LE instead of Visual Studio Setup Projects. This is a major shift, but it seems MS is moving away from supporting native installers and letting others manage this burden. WiX is an alternative installer, but I have not tried it out. WiX (Windows Installer XML) still lacks the UI that is present with InstallShield LE or VS 2010 Setup Projects.
使用VS 2012进行开发的唯一优势是开发IDE更快.
The only advantage of using VS 2012 for development is that development IDE is much faster.
这篇关于如何使用VS 2012创建(VSTO)Office 2007加载项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!