Excel-DNA / Excel-DNA/ExcelDna
RTD functions don't work when Excel requires signing
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 292
- Avg merge
- 20d 12h
- Merged PRs (30d)
- 1
Description
Hi
This is kinda similar to #141 but I thought I'd writeup exactly why this isn't working:
Sample testcase:
- Start Excel, ensure in trustcenter that "Require Application Add.ins to be signed by Trusted Publisher" is ticked.
- Create new ExcelDna addin as per normal
Add code:
```
[ExcelFunction(Description = "My first .NET function")]
public static object SayHelloAsync(string name)
{
return ExcelAsyncUtil.Run("RunSomethingDelay", null, () => RunSomethingDelay());
}
public static string RunSomethingDelay()
{
Thread.Sleep(2000);
return "test";
}
```
Try and use it: you should get the following warning:

We see that the call succeeded:

We then don't actually manage to create the RTD server, but Excel reports success. We add this to loadedRtdServers, so when further calls try and use the RTD functions (after accepting the security warning), we try and use the RTD server that never started.
I'd very much like to try and fix this, any guidance to the preferred way? It seems that somehow we need to track the point of the RTD server actually starting up, not just the request to start it up. Otherwise I'll see if I can create something to fix this.
Thanks,
Steve
Contributor guide
Assessment
This issue has not been assessed yet.