My plugin loads with release dll, but fails on the debug dll

My plugin loads with release dll, but fails on the debug dll

mgrahamKYNPQ
Explorer Explorer
820 Views
2 Replies
Message 1 of 3

My plugin loads with release dll, but fails on the debug dll

mgrahamKYNPQ
Explorer
Explorer

Revit 2020, Windows 10

I inherited a C# plugin code relies on a C++ dll. The combos that work (ribbon displays, commands work, etc):

Csharp.dll and Cplus.dll, when both are built as release

Csharp.dll (debug) and Cplus.dll (release)

This combo does not:

Csharp.dll(debug) and Cplus.dll (debug) gives an

External Tools - External Tool Failure 

Revit cannot run the external application "MyAppName". Contact the provider for assistance. Information they provided to Revit about their identity: MyCompanyName

 System.DllNotFoundException: Unable to load 'Cplus.dll': The specified module could not be found. (etc)

 

I have been comparing the build settings for Release vs Debug, but have not found anything helpful.

0 Likes
821 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk

Perform a detailed analysis of the symbols exported by the C++ DLL. 

 

The debug version is probably adding some information to them and possibly also modifying its class and function signatures.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 3

stever66
Advisor
Advisor

If you have copied any of the DLL files from one computer to another, in Windows Explorer, right click the DLL files, select properties, and make sure Windows Security hasn't disabled the DLL.  

 

You have me wondering if Windows might just disable debug DLL's, but not release DLL's.

 

I assume you realize debug and release DLL's typically get created in different folders.  So I assume you are copying these to the right location, or verifying that they are in the folder where your Add-in file is looking?

 

I like to check the time stamps on the DLL's everytime I make changes, just to make sure I'm using the one with my latest changes.

0 Likes