VSTO and C# Automation Dll

I make use of IsWeekDay function in an C# excel automation/add-in dll (Like the example in Visual Studio Tools for Office - Carter and Lippert) in my VSTO project.  For some reason when i open the VSTO document all the calls to my automation dll show up as #NAME in the cells.  Looking in process explorer my automation dll is not even loaded into memory.

Now if any other non VSTO workbooks are opened that makes use of the automation functions they too show #NAME .

To make it work I must open a workbook with no VSTO code behind that uses the functions.  Then when I can open my VSTO the #NAME s resolve and call the functions. 

What is the VSTO/Excel runtime doing/not doing when a VSTO document loads that is causing my automation functions not to resolve

I am using the RC candidate still.


Answer this question

VSTO and C# Automation Dll

  • HHAAPPYY

    There should be no problem here. I've tested managed automation add-ins combined with VSTO solutions, and both get loaded, both work fine.

    It may be some CLR versioning mismatch you're hitting - are you building the automation add-in with the same version of .NET and VS as the VSTO solution

    Are you using a shim for your automation add-in Is the shim force-loading a particular version of the CLR

    Andrew Whitechapel [MSFT]

  • JeffSeifert

    I found an excel only solution so I stopped trying to get it work.  go ahead and close it.  thx
  • victtim

    Dan,

    Andrew offered up some good things to look for a few weeks ago. To keep things tidy, if we don't hear from you in the next week, we'll just consider this problem solved and close the loop in the thread.

    Best of luck on your solution!

    John.



  • VSTO and C# Automation Dll