Hello Dennis,
The DLL name is correct ('MARS.dll'). After my initial post in this thread, I included the dependency to Microsoft.Office.Interop.Excel.dll I was able to install and run the solution on my development machine. I have still not been able to run it on client machines.
Using the Microsoft .NET Framework 2.0 Configuration, I was able to determine that the full trust has been granted to the assembly after installation, so the CAS problem seems to have been overcome using the 'SetSecurity' project indicated in Parts 1 and 2 in my original post. This goes for the development and client machines.
On the client machine I am now back to the error "MARS.dll is not a valid Office Add-in."
I have manually uninstalled both the vstor and Visual C++ Redistributable packages from the client machine, and the setup for my solution detects their absence and re-installs both of these, so the setup seems to be working in this regard.
After the minor success of including the Microsoft.Office.Interop.Excel.dll dependency, I re-included all the other dependencies in the setup project, however this does not solve the issue on the client machine.
The client machine is Windows XP running all critical updates, so I am fairly certain there is no issue with .NET.
My CustomActionData for the SetSecurity Custom Install Action is (all as one string - separated here for clarity):
/assemblyName="MARS.dll"
/targetDir="[TARGETDIR]\"
/solutionCodeGroupName="IMO.MARS"
/solutionCodeGroupDescription="Code Group for MARS"
/assemblyCodeGroupName="MARS"
/assemblyCodeGroupDescription="Code Group for MARS"
/allUsers=[ALLUSERS]
As I mentioned above, the .NET Framework 2.0 Configuration shows that this grants full trust to the appropriate location.
One thing I did notice between the development machine and the client machine is that on the development machine, the add-in location is not the installed location. The installed location is:
C:\Program Files\Common Files\Microsoft Shared\VSTO\8.0\AddinLoader.dll
Instead of the expected:
C:\Program Files\MARS\MARS.dll
Is this normal (if there is such a thing as normal here) behaviour?