BenDowling

VSTO projects have a huge amount of dependencies! Is there any way to reducde the number of external dependencies For example, can I set the "Copy Local" attributes of some of the references to true, and bypass the external requirement

If so, what external dependencies are you remove the need for, and how

Many thanks, Ben


Re: Visual Studio Tools for Office Reducing Dependencies

Geoff Darst - MSFT

Hi Ben,

Could clarify why you are concerned about dependencies

VSTO projects do not reference any assemblies that are not already installed in the GAC by either the .Net Framework, the VSTO runtime or Microsoft Office. So although there are quite a few dependencies, none of them add any overhead to deployment since they are all part of basic machine prerequisites. Along those lines, I'm unclear what you would be trying to accomplish by using "Copy Local".

While the majority of the dependencies are actually needed, there are some that are added by default because the majority of projects tend to use them. If you didn't actually need them in your own project, you could safely remove the references. Unfortunately, I can't give you a list of what these are so you will have to experiment by removing a reference and trying to build. In many cases, you will need to remove namespace declarations from the document code files.

Sincerely,

Geoff Darst

Microsoft VSTO Team





Re: Visual Studio Tools for Office Reducing Dependencies

BenDowling

To make the installation easier. For example, can I prevent the need for the user to install the PIAs

Thanks, Ben




Re: Visual Studio Tools for Office Reducing Dependencies

Geoff Darst - MSFT

Hi Ben,

Sorry, but you can't get away from needing to have the PIAs on the user's machine (or any of the other pre-requisites)--see http://msdn2.microsoft.com/en-us/library/2ac08ee2(VS.80).aspx. In theory, I think you could probably deploy PIA assemblies with the customization (as opposed to installing them in the GAC), but such an approach wouldn't be recommended as it would unnecessarily pollute the user's machine with multiple copies of the PIAs.

That said, the good news is that as long as the .Net FX 1.1 was installed on the machine prior to Office being installed, a typical Office install will have configured the PIAs to be installed automatically on first use (which is sufficient for VSTO). Alternatively, you can redistribute the Office 2003 PIAs yourself. If you are doing a local deployment, the setup project allows you to include the PIAs as part of the prerequisites so your setup would automatically run the PIA redist setup. Here is a very good article that documents the different ways to install the PIAS: http://msdn2.microsoft.com/en-us/library/aa159923(office.11).aspx

Sincerely,

Geoff Darst

Microsoft VSTO Team