Hi,
I've seen that Revit only loads one instance of a third party library even though different addons reference different versions.
This can be handled if it is only your own addons so that you can control what library the addons load, but what if it is other addons that you cant control?
I've seen different versions of log4net then the one we use in addons people download and this causes problems when our (or the other addons) try to load their libraries...
Has anyone come across this problem and have a nice solution for it?
Thanks!
/Erik
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Hi,
even worse, Autodesk itself uses third-party libs:
http://adndevblog.typepad.com/aec/2013/01/sqlite-version-conflict-with-revit-add-ins.html
Revitalizer
Hi,
developers could use Revit's built-in JournalData instead of log4net, but that doesn't solve existing conflicts.
Also, as far as I can see, JournalData can only be used in command or idling context, but not, for example, OnStartup.
Revitalizer
Hi,
no idea, I'm not an Autodesk employee.
But I think that even the people who know the answer will not reply to your question because it's a company's secret.
Revitalizer
Dear Erik and Revitalizer,
I think this is more of a .NET issue and has very little to do with Autodesk, except that we have to suffer the DLL hell just like everybody else using the Windows and .NET platform.
I have no idea either what version of SQLite is used by Revit
In general, my motto has always been to minimise all external dependencies, or preferably elmimnate them altogether.
Then this issue disappears and all are happy.
Unfortunately not always feasible, I absoluetely realise.
You say:
> Do you know of way to make your own addons less sensitive?
If possible, it might help to add version numbers into the referenced DLL names.
> To stop enforcing a specific version for instance, and try to invoke their methods anyway?
You might explore the .NET framework for DLL conflict resolution functionality.
I believe that you can register callbacks to react on DLL version issues, and implement automatic resolution mechanisms.
I hope this helps.
Cheers,
Jeremy
Hi Jeremy,
Having a logging tool installed in all apps is a really good help when it comes to finding bugs in client machines.
That said, I actually came up with the same idea the other day.
I've been using the assemplyresolve event for other things previously. Im gonna give that a go.
Thanks!
/Erik
Hi,
an addition, for completeness' sake:
one can indeed use Revit's journaling mechanism OnStartup and OnShutdown(UIControlledApplication application).
application.ControlledApplication.WriteJournalComment()
Revitalizer
We've spent some time researching this problem and have documented our findings at the attached URL (the forum was giving me some trouble pasting the URL directly).
One solution we've found is to download the source code of the third party library (assuming it is available) and do a custom build with a different dll name. The main downside to this is it makes updating to a newer version of the third party library a more significant undertaking.
Can't find what you're looking for? Ask the community or share your knowledge.