I have developed an excel add-in using Visual studio 2010 with target framework as 4.0 client profile.
The addin works fine on my machine and now I would like to ship my client’s machine.
I am hosting my add in my website so that it can be downloaded from there directly.
The problem I am facing is that, on the client’s machine the add-in installs fine but does not load. When I go to the Add in section in “Options” menu, after selecting my COM add-in I find that the load behavior says,
Load Behavior: Not Loaded. A runtime error occurred during the loading of the COM Add-in.
My best guess here is that since, I had developed my add-in using .Net 4.0 client profile all the .Net references I used were being references from the version 4.0, and that at the client end it is trying to find .Net 4.0 assemblies, but is unable to locate them since my client has .Net 2.0 hence it does not load the add-in.
But I want to deploy it on a client with .Net framework 2.0 and above, without installing .Net client profile 4.0.
If any one knows how to figure this thing out, please help me.
I think you are out of luck from VS2010, but you should be able to deploy an Excel add-in on a .NET 2.0 machine by using the templates from Visual Studio 2008, where I am pretty certain the option is available, so one option is to back-port your solution into VS2008 and one of its “older” VSTO project types. This is no fun, but should work out.
It depends a bit on what your add-on does, but another consideration is to look into the open source / free ExcelDNA, which provides a nice way to create a bridge between XLLs and .NET, enabling easy calls into .NET dlls.
I haven’t used it myself, but NetOffice may also be something to look into.