My Navisworks Manage plugin don't load my another user .NET DLL

My Navisworks Manage plugin don't load my another user .NET DLL

GERSONBARBOZA
Explorer Explorer
1,127 Views
5 Replies
Message 1 of 6

My Navisworks Manage plugin don't load my another user .NET DLL

GERSONBARBOZA
Explorer
Explorer

I create a plugin that run correctly, but when need to call another .NET DLL (this DLL isn't registered in GAC) this call raises an unhandled exception that closes the Navisworks Manage 2022 Application.
I tested this call with a .NET DLL (test.dll) that only executes 'MessageBox.Show("I am here");' and this exception always occurs.
To extend this test I created a .NET executable that calls the same test.dll and all run fine.
In Resume:

+ plugin doesn't call anything -> it's fine
+ plugin calls mytest.dll -> crash
+ another executable calls mytest.dll -> it's fine


Because this I think if Navisworks plugin need a special configuration or permission to call another custom .NET DLL that isn't in GAC.
This is correct? How can I solve this problem to be able to call my test.dll from this plugin?
Thanks for any help.

0 Likes
Accepted solutions (1)
1,128 Views
5 Replies
Replies (5)
Message 2 of 6

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @GERSONBARBOZA ,

 

You mentioned your Navisworks Manage plugin don't load my another user .NET DLL but loads the dll from the same user.

 

When you get dll from some other user, Windows will sometimes treat these DLL files as suspicious and automatically block them from running.

 

I think you need to unblock the another user .NET dll.


To unblock the dll, right click dll file 

Go to Properties >> General >> Unblock 

 

If this is not helpful, Please send me a minimum reproducible visual studio sample project ,detailed description of your issue and , step-by-step approach to reproduce the issue.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 3 of 6

GERSONBARBOZA
Explorer
Explorer

.

0 Likes
Message 4 of 6

GERSONBARBOZA
Explorer
Explorer

Hi, Naveen.
Thanks for your help, but I was amazed with your suggestion to unblock the DLL. I confess that I have never seem this on windows system. 🐵
Despite that I tried your procedure and there was no unblock option for my test.dll.
I'm sending to you a simple solution to test and verify the problem.
This solution has three projects:

NavisworksRibbonHub (the plugin);

TestLibrary (the test.dll); and

ExecuteTestLibrary (the windows forms application that calls the test.dll, my sanity test :o)) ).

The build output of NavisworksRibbonHub is in default visual studio folder, and I use the post build event to copy these files to plugin directory.

 

Again, thanks for your help.

0 Likes
Message 5 of 6

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @GERSONBARBOZA ,

 

I can reproduce the problem on my end.

 

Placing "TestLibrary.dll" in "C:\Program Files\Autodesk\Navisworks Manage 2024\Dependencies" folder helped me to solve the problem.

 

Below link helped me to solve the problem

https://forums.autodesk.com/t5/navisworks-api/how-to-reference-other-dlls-into-my-plugin/td-p/346912... 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 6 of 6

GERSONBARBOZA
Explorer
Explorer
Thanks. This solved the problem.
0 Likes