1

After deploying a VSTO Excel Add-In I am unable to read the app.config file.

My question is identical to this one:

VSTO Debug version fine, Installed version doesn't read app.config

Except, when I change the registry entry to use the file:/// as suggested in the post I get the following error:

The common language runtime could not be loaded by file:///C:\Program Files (x86)\company\product\addin.vsto|vstolocal. Contact your administrator for further assistance.

Without using file:/// the Add-In loads fine but doesn't read the configuration file.

I am using the following software:

  • Excel 2010 (installed - 32bit)
  • VSTO 2010 (10.0.60724 - 64bit)
  • Windows 7 (64-bit)
  • .NET (4.6.00081)

The link here says that based on my software I needed to install the 64bit of VSTO:

https://msdn.microsoft.com/en-us/library/bb608603.aspx?f=255&MSPPError=-2147217396

I tried to install .NET 4.0 and .NET 4.5 but as 4.6 is installed it won't continue. 4.6 is required by the add-in.

Is there something I am missing that is required to get this to work?

Community
  • 1
  • 1
Mr.Brownstone
  • 714
  • 6
  • 14

1 Answers1

1

I managed to resolve this. The problem was that InstallShield does not contain a prerequisite of .NET 4.6.1 yet and so the developer had selected .NET 4.6 instead, however when the Add-In loads it looks for the exact version of .NET it requires which was not part of the installation.

To resolve, I removed .NET 4.6 and installed 4.6.1 manually.

Mr.Brownstone
  • 714
  • 6
  • 14
  • 1
    As an aside...your original post said you were using .Net 4.6...and not 4.6.1. ;-) – ΩmegaMan Jun 28 '16 at 17:52
  • Unfortunately that is what I was told by the developer, it was only when I looked at the registry keys that I saw 4.6.1, thus leading to the actual underlying problem. Thank you for your help though. :) – Mr.Brownstone Jun 28 '16 at 18:03