D开发者_C百科oes VSTO 3.0 (using Visual Studio 2008) support both Office 2003 and Office 2007 installed side-by-side on a single development computer so that both Office 2003 and Office 2007 can be targeted (in separate solutions)?
I have seen conflicting information about this.
NO: http://msdn.microsoft.com/en-us/library/bb398242.aspx
Visual Studio Tools for Office does not support installing Microsoft Office 2003 and the 2007 Microsoft Office system (or different versions of the same application, such as Word 2003 and Word 2007) side-by-side on the development computer. To develop solutions for different versions of Microsoft Office, use a different development computer for each version of Microsoft Office.
YES: http://msdn.microsoft.com/en-us/library/15s06t57.aspx
When you install Visual Studio Tools for Office, the primary interop assemblies are automatically installed to a location in the file system, outside of the global assembly cache. When you create a new project, Visual Studio Tools for Office automatically adds references to these copies of the primary interop assemblies to your project. Visual Studio Tools for Office uses these copies of the primary interop assemblies, instead of the assemblies in the global assembly cache, to resolve type references when you develop and build your project.
These copies of the primary interop assemblies help Visual Studio Tools for Office avoid several development issues that can occur when both the 2003 and the 2007 versions of the Office primary interop assemblies are registered in the global assembly cache.”
Has anyone done this and were there any problems?
You can target both 2003 and 2007 with the same computer - but you need two different programs for that in Visual Studio (e.g. MyCoolThingfor2003.sln and MyCoolThingfor2007.sln) as they have different interops. But you should not have both Office programs installed on that same computer.
You can't install Office 2003 and 2007 side by side. The two links you posted talk about different things. The first link says no to installing the actual Office 200x application, whereas the second link refers to the PIA (which is just a wrapper). You can install any version of the PIAs on a computer side by side, but it doesn't mean it'll launch different versions of office.
If your goal is to develop a VSTO addin that supports both Office 2003 and Office 2007, then you'll need to develop on a system with VS2008 + Office 2003.
精彩评论