How to deploy and debug Office 2007 - 2000
add-in / plug-in in VB.NET, C#, C++ - tips

Add-in Express
for Microsoft .net


Add-in Express Home > Add-in Express.NET > Online Guide > Deploying and debugging tips

Deploying and debugging tips

Writing COM add-ins in Visual Studio .NET - Flash video

Deploying Office add-ins
Deploying add-ins – shadow copy
Deploying – "Everyone" option in a COM Add-in MSI package
How to find the PublicKeyToken of my add-in?
My add-in is always disconnected
ClickOnce cache
ClickOnce deployment

Deploying Office add-ins

  • Make sure your Vista, Windows XP, and Office have all updates installed: Microsoft eventually closes their slips and blunders with service packs and other updates. Keep an eye on Visual Studio 2005 updates, too.
  • Whenever possible, include the Shared Add-in Support Update for Microsoft .NET Framework 2.0 (KB908002) to Prerequisites of your VS2005 project. On Vista, if you add-in will be installed for all users under an admin account, then the admin must run setup.exe. A Vista standard user must run msi and not setup.exe.
  • If a non-admin user will install your add-in, use [AppDataFolder] as the default location. Make sure the user is instructed to run MSI. On Vista, if the user runs setup.exe, a non-admin will get the elevation dialog and this can end with installing the add-in to the admin profile. In such a case, the add-in will not be available for the standard user.

Deploying add-ins – shadow copy

The Add-in Express Loader uses the ShadowCopy-related properties and methods of the AppDomain class. When you run your Add-in Express based add-in, the host application loads the Add-in Express Loader DLL referenced in the registry. The Add-in Express Loader DLL does the following:

  • It finds your add-in DLLs in the DLL Cache. If there are no add-in DLLs in the cache it copies all .NET DLLs to the cache (including dependencies). The cache folder is located in c:\Documents and Settings\<user name>\Local Settings\Application Data\assembly\dl<number>. If all add-in DLLs (including dependencies) already exist in the cache, it compares their versions. If the versions are not the same, it copies new DLLs to the cache.
  • It loads the add-in DLLs from the cache.

You can see how the add-in versioning influences the add-in loading. This approach (it is built into .NET, as you see) allows you to replace add-in DLLs when the add-in is loaded. The disadvantage is numerous files located in the cache. As far as we know, Microsoft doesn't provide a solution for this problem. You may think you can remove these files in an add-in’s uninstall custom action. But you remove the files from the current profile only.

Deploying – "Everyone" option in a COM Add-in MSI package

The Everyone option of the msi installer doesn't have any effect on the Add-in Express based COM add-ins and RTD servers.

How to find the PublicKeyToken of my add-in?

It can be found in the setup project (that must be already built) - click on your add-in primary output in the setup project and, in the Properties window, expand the KeyOutput property and see the PublicKeyToken property value.

My add-in is always disconnected

If your COM add-in fires exceptions at the startup, the host application can block the add-in and move it to the Disabled Items list. To find the list, in the host application, go to "Help", then "About". At the bottom of the About dialog, there is the Disabled Items button. Check it to see if the add-in is listed there (if so, select it and click the enable button).

ClickOnce cache

The cache location is visible in the COM Add-ins dialog. It may have the following look:

C:\Documents and Settings\user\Local 
Settings\Apps\2.0\NCPNO3QK.0KJ\ONNRMXC3.ALM\add-..d-
in_5c073faf40955414_0001.0000_2a2d23ab74b720da

Currently, we don't know if there is a decent way to clear the cache. Read more about deploying Office add-ins with Add-in Express ClickOnce solution.

ClickOnce deployment

Make sure that your IIS is allowed to process .application files. For instance, on one of our PCs, we had to edit the urlscan.ini file created by UrlScan. The only change was adding the .application extension to the AllowExtensions list. The full file name is C:\WINDOWS\system32\inetsrv\urlscan\urlscan.ini.

See also some tips about:

Note, If you didn't find the answer to your questions on this page, please see the HOWTOs section:

Office 2007 Ribbon tips <<

>> Building Office COM add-in

Back to Add-in Express.NET homepage




Client login

 

Login 

Password 

 

Remember me

Forgot my password