33.5. Deploying Office Applications
The two main ways to deploy Office applications are either using a traditional MSI setup project, or using the support for ClickOnce deployment that is built into Visual Studio 2008. ClickOnce is available only for Office 2007 solutions, although it can be used with both document-level customizations and application-level add-ins.
In previous versions of VSTO, configuring code access security was a manual process. Although VSTO hides much of the implementation details from you, in the background it needs to invoke COM+ code to communicate with Office. Because the CLR cannot enforce code access security for non-managed code, the CLR requires any applications that invoke COM+ components to have full trust to execute.
Fortunately, the ClickOnce support for Office applications that is built into Visual Studio 2008 automatically deploys with full trust. As with other ClickOnce applications, each time it is invoked it automatically checks for updates.
When an Office application is deployed it must be packaged with the required prerequisites. For Office 2007 applications, the following prerequisites are required:
Windows Installer 3.1
.NET Framework 3.5
Visual Studio Tools for Office 3.0 runtime
Microsoft Office 2007 primary interop assemblies (PIAs)
A primary interop assembly is an assembly that contains type definitions of types implemented with COM. A redistributable package of the Microsoft Office PIAs is available for download from Microsoft at no ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access