Problems Deploying Add-In

Feb 6, 2012 at 2:37 PM

Good Afternoon,

I developed an add-in to be deployed on a corporate scale some months ago, and it has finally come to crunch time with the deployment.

Having rigorously tested the add-in when built for .NET 4.0 and having the runtime version set to 4.0 in the .DNA file, I found that the add-in worked perfectly and as I would expect. However, it soon became known that any chance of people upgrading to .NET 4.0 was unlikely and that I was to develop the add-in to work with .NET 3.5.

This didn't prove an issue, I changed a couple of lines of code and removed the 'RuntimeVersion' tag from my DNA file, as well as changed the VS2010 properties in my solution to be built for 3.5. I test deployed the add-in (which is a dll built to an xll, installing on Excel 2003) on my own machine and it installed fine, the same results appeared on my developer colleagues PC, with the toolbar and buttons appearing and all of the functionality being fine.

However, I then moved on to deploy the add-in throughout the users and after upgrading them to .NET 3.5 from the network's control panel and installing the add-in, I noticed that the add-in appears to 'load' when I do 'File -> Open' or 'Tools -> Add-ins', but the toolbar for the add-in does not appear, and I can't for the life of me figure out why, its worth mentioning at this point that no instance of the toolbar is created at all, so I can't right click and check the toolbar, it simply isn't there.

Has anyone encountered this problem or does anyone have any suggestions?

Many Thanks


Feb 6, 2012 at 3:01 PM

Hi Tellu,

When you say it 'appears to load', what are you seeing:

  • Does it show the "Registering Library ....." in the Excel status bar?
  • Do user-defined functions defined by the add-in work OK?

If the UDFs work but not the toolbar, you need to explain how you are loading the toolbar: via code, via xml in the .dna file etc.

Could it perhaps be security settings on the other machines?


PS. For interest's sake, why was deploying .NET 4 an issue - it's actually a smaller installation than .NET 3.5, and extremely unlikely to break any existing applications.

Feb 6, 2012 at 4:00 PM
Edited Feb 7, 2012 at 9:49 AM

Hey Govert,

I've since left work and am now at Home - when adding the add-in via the 'Tools -> Add-Ins', the .xll file I was adding did appear in the add-ins list with a checked box. 'Registering Library' did appear, and UDF's are available - however the Toolbar simply doesn't become available at all.

The toolbar is added through the C# code which is tried and tested and worked fine using .NET 4, I was previously deploying the add-in through packing it in .NET 4 and just sending the file around, which didn't pose a problem, but something seems a little different with the solution configured for 3.5 so I decided to store the DLL's I had used locally.

I'm running with Excel 2003, and as far as security settings go I had checked all of the basic options, but if you could list a few that might have an impact that would be great!

With regards to .NET 4, unfortunately I hold no power over what comes as 'standard' on my work network, and unfortunately its not an option at this point.

As always, thanks for the reply - really nice to have such an active coordinator.


Feb 6, 2012 at 4:56 PM
Hi Telluria,

I'm guessing you are adding the toolbars with some reference to a COM interop library.
Maybe start with a small example that just does the CommandBars, or search for 'CommandBars' here or on the Google group for some alternative plans.

Feb 7, 2012 at 9:54 AM
Edited Feb 7, 2012 at 9:54 AM


Interestingly I discovered the fix to this issue.

When developing a class library in .NET 4, under the reference properties there is an option 'Ember Interop Types' which doesn't appear in .NET 3.5, when I specified the references to copy to output on build (in 3.5) and tried reinstalling the add-in on another PC it worked a treat.

Basically, when switching from .NET 4 you need to make sure you take all of the references (copy them on build to bin/debug) and then install as per usual due to the fact that in 3.5 the embed option isn't present.

Interestingly, the add-in worked from my PC because of the GAC (Global Assembly Cache for those who are unfamiliar) and the same for my colleagues PC, but taking the references to Excel etc. makes this universally 'work'.

Thanks for your replies.