As part of an attempt to figure out the various issues working with (previously) working .NET COM projects and Excel 2013 on my machine, I created a simple test C# RTDServer class in Visual Studio 2013. Creating the test RTD Server project helped me realize that my Excel 2013 was a 64 bit version and that I needed to set Target Platform to x64 for any .NET COM components to work with this version of Excel.
This test RTD component works fine (as long as it is compiled as x64), but I cannot Debug into the code using Visual Studio. What used to work on older projects is to set the Start-Up Application to Excel.exe and then I could always hit a break point in the ServerStart(IRTDUpdateEvent CallbackObject)
method, for example.
However when I try this with VS 2013 project, it never hits the break point. If I set a new break point while it is running I see the message:
The breakpoint will not currently be hit. No symbols have been loaded for this document.
I have searched a lot for the solution to this, but not found anything that worked yet.
It turns out this problem was caused by an app config for Excel which we had to use when running with Excel 2003 (when we first developed this app).
The config contained the following:
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v1.1.4322"/>
<requiredRuntime version="v2.0.50727"/>
</startup>
However, this RTD Server was using .NET 4.5. Once I deleted the config file from the Office directory, it started working in debugger.