Hi Eric,
It might be that your assembly is a mixed assembly, with both native
and managed code, that targets .NET 2.0. (For example
System.Data.SQLite).
If so, .NET 4.0 won't load it be default. You can explicitly allow it
to load by adding something like this to your excel.exe.config file:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"
sku=".NETFramework,Version=v4.0,Profile=Client"/>
</startup>
I think "useLegacyV2RuntimeActivationPolicy" is the right term to
Google for in this context.
If your assembly is a regular managed assembly targeting .NET 2.0, I
don't expect any problems like this.
Regards,
Govert
On Jun 27, 1:29 pm, Eric <
eric.decha...@gmail.com> wrote:
> Hi Govert,
>
> There is a new excel addin that was created by a different team that change
> excel.exe.config to supportedRuntime version="V4.0". The ExcelDNA addin
> that I created basically cannot run side by side with that add-in. What I
> did is change the .dna file for my addin to have "<DnaLibrary
> RuntimeVersion="v4.0">. The .Net error failure was now gone and I can load
> my dll however when I start to call the function which references another
> dll which is compiled using .net v2, I am getting this:
>
> *Could not load file or assembly 'xxx, Version=1.1.7.0, Culture=neutral,
> PublicKeyToken=20fc1ffb797ec904' or one of its dependencies. Failed to load
> the runtime. (Exception from HRESULT: 0x80131700)*
>
> Have you come across this error?
>
> Regards,
> Eric