Do i have to force the customers to install the Office Xxxx Primary Interop Assemblies

ms-office

It seems if you try to reference the Office COM objects (as you would do in other development environments), Visual Studio gets it wrong – and it just won't work.

So you must use the converted type library that Microsoft hand-converted and makes available for download, and download, and download.

Now it seems that in order for my application to run it needs the Office Interop code, which is contained in an assembly.

Now i don't want to force my customers to install the Office 2007 Primary Interop Assemblies, Office 2003 Primary Interop Assemblies or the Office XP Primary Interop Assemblies. i want an xcopy deployment.

If i manage to get a hold of Microsoft's copy of the interop assemblies, can i just copy them to by Bin/Debug and Bin/Release folders?

If i include the Office 2007 interop assemblies, will it work if the customer has Office 95 installed, or do i have to include all versions of the Office Interop dll's Microsoft has ever published?

Best Answer

This is a common question with a rather complicated answer. Mary Lee of MSFT is a great resource for information about this:

http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx

Using ClickOnce to deploy is the closest you are going to get to an XCopy install of any application built on VSTO.

Also, check this post:

http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/1666d2b0-a4d0-41e8-ad86-5eab3542de1e/

Finally, Misha has a great blog:

http://blogs.msdn.com/mshneer/archive/2006/01/05/deployment-articles.aspx

The PIAs are specific to the version of Office you are targeting, so the 2003 PIAs are necessary for targeting 2003 and the 2007 PIAs are necessary for 2007. Automating Office 95 via managed code is something I have not done before, but I can imagine you are directly referencing the type libraries so a RCW is generated for you and has nothing to do with PIAs.

HTH

Colby Africa (MSFT)

Related Topic