How to support multiple versions of the same plugin at the same time?

How to support multiple versions of the same plugin at the same time?

Simon.Guy
Explorer Explorer
692 Views
1 Reply
Message 1 of 2

How to support multiple versions of the same plugin at the same time?

Simon.Guy
Explorer
Explorer

I have a plugin that has different versions, and they need to be both installed at the same time. The plugin has the main dll file and a few dependency dlls. I'm using the .bundle setup (using a folder in %PROGRAMDATA%) and so the dlls are not in the main Navisworks folder (eg: \Autodesk\Navisworks Manage 2019\Plugins)

The plugin dll (and dependencies) have the same filename. It's a CommandHandlerPlugin and adds command buttons to the Navisworks ribbon. Each version's name is displayed on the ribbon, so that the user knows which command button is for which version.

 

The problem that I'm having is that when Navisworks (either Simulate or Manage) starts up, it does not load the second plugin; it loads whichever plugin is first, alphabetically. So the user sees only one of the versions, even though both are installed correctly. I have confirmed that both work correctly on their own: it's only when both exist together that the second plugin is not loaded.

 

How do I configure my plugins so that Navisworks will load both of them?

0 Likes
693 Views
1 Reply
Reply (1)
Message 2 of 2

awmcc90VZTT2
Contributor
Contributor

Install the different versions into different sub-directories, I. E. Contents/v1/ and Contents/v2/ and then update your Package Contents.xml to point to the new assembly location (contents/v1/v1.dll, contents/v2/v2.dll).

 

Also, it's probably a good idea to rename the assemblies based on version. If it's currently Library.dll then name them Library.v1.dll and Library.v2.dll.