I currently have office 2010 installed, and am trying to assist a coworker who's still using 2007 with VSTO solution. This is turning into a mess since my copy of visual studio thrashes the project files updating them to point to the O2010 dlls. If I were to install office 2007 beside 2010 would I be able to open the solution without the upgrade wizard mangling everything, or are my only options making significant architectural changes to the solution or reverting to O2007 until my employer makes O2010 the new standard.
3 Answers
You cannot run Outlook versions side-by-side (and here).
You can still target both 2007 and 2010, but you need to research embedded interop types.
You shouldn't need to install Office 2007 to create Office 2007 add-ins. I think the problem here is that you're missing the proper VSTO components.
Make sure you've installed the following:
- All .NET and developer tools from Office (from the Office 2010 installer -- no need for the Office 2007 installer)
- Microsoft Office Developer Tools from Visual Studio (from the VS installer)
- Microsoft Office 2007 Primary Interop Assemblies
- Microsoft Visual Studio 2010 Tools for Office Runtime
- Microsoft Visual Studio Tools for the Microsoft Office system (version 3.0 Runtime)
If any of these are already installed then I recommend repairing their installations.
Try disabling this option:
Options > Office Tools > Project Upgrade > Always upgrade to installed version of Office (more info here)
I don't think this solves the root problem which is that you shouldn't even be prompted to upgrade your project. I still suspect that there is something wrong with the installation of your VSTO-related components (see my other answer for that info). However this may be an easy workaround.
To be clear, you can develop Office 2007 add-ins without having Office 2007 installed. I'm doing so right now without having to follow this workaround.