Hi Sergey,
For my simple test, there is no problem executing code from a
dependent assembly which sits next to my .dll and .xll.
I would not expect the missing reference to cause an error that
crashes Excel (unless you have marked your function as
IsExceptionSafe=true and it throws an exception).
If you indeed have a scenario that crashes Excel, I'd certainly like
to have a closer look.
I don't think the <Reference /> entries are used in the usual runtime
scenario. They are used in two cases:
1. compiling code at runtime from inside the .dna file.
2. To determine which dependencies should be packed by the packing
tool.
So it seems the <Reference> won't help you in the current problem.
Sebastian is right that a number of things might be wrong with the
assembly loading, throwing some exception, but these should not crash
Excel.
Catching and printing the exception details could help debug. I can
think of issues like:
1. You are running under .NET 2.0 but the dependent assembly
target .NET 4.0 (add a <DnaLibrary RuntimeVersion="v4.0"> in your .dna
file).
2. You are loading a mixed-mode assembly built for .NET 2.0 into
a .NET 4.0 environment (add some entry in the excel.exe.config).
3. You are loading a 32-bit assembly into a 64-bit process (Excel 2010
64-bit).
4. The assembly you are loading is damaged or has other dependencies
that are not present.
-Govert
On Aug 16, 7:16 pm, SebastianDotNet <
supermicrosch...@gmail.com>
wrote: