Code Red > .NET

Autoloader does not load my dll

(1/2) > >>

AngelKostadinov:
Hello,

I use Autodesk Autoloader http://adndevblog.typepad.com/autocad/2013/01/autodesk-autoloader-white-paper.html in order to deploy my extention application.
I put myApp.dll and PackageContents.xml files into ProgramFiles/Autodesk/ApplicationPlugins/MyApp.bundle folder. The structure of the xml file is carefully taken from Autoloader White Paper and ModuleName attribute points directly to my dll file:
--- Code: ---ModuleName="myApp.dll"
--- End code ---
When AutoCAD starts, it loads my dll automatically, cool!

Now I have to introduce "autoupdater" functionality and that what I'm doing is on AutoCAD startup, to check, if new version of dll is available and download it to a subfolder:
ApplicationPlugins/MyApp.bundle/NewVersion/myApp.dll. I inform the user, that a newer version is available and it has to restart Autocad. Meanwhile, I change ModuleName attribute value to point to the newer dll version
--- Code: ---ModuleName="./NewVersion/myApp.dll"
--- End code ---
The problem is that, when Autocad is restarted, neither one of two (old and new) files are loaded.
If somebody has already faced the same issue, please suggest something :)

Bryco:
This function sounds very cool. What I do is first autoload a dll that checks for a newer version and if true copies the new one to the appropriate spot then the next autoload loads the dll. I put it in acad support (probably  a non kosher move) but it is available to all users on that box using acad

BlackBox:
Perhaps this?

http://www.blog.cadnauseam.com/2016/07/28/hotfix-for-autocad-2017-sp1-autoloader-bug/

AngelKostadinov:
Thank you for the replays!

Very tricky problem, indeed. Sometimes works, sometimes does not. I found some related threads on Autodesk's forum, like this one: http://forums.autodesk.com/t5/net/autocad-2015-autoloader-changes/td-p/4910140. It seems that people have a problem with XML structure of the PackageContents file, so I will compare everything again with the white paper and if spot something will update the post.
With regard to AutoCAD version, I could say that my extension will be used on Acad 2012 <-> 2016 and I don't think it wil be used with 2017 soon.

As a side note, BricsCAD doesn't support Autoloader mechanism in a such way as AutoCAD. I have to edit registry keys in that case.

Atook:

--- Quote from: Bryco on January 14, 2017, 08:38:28 PM ---..What I do is first autoload a dll that checks for a newer version and if true copies the new one to the appropriate spot then the next autoload loads the dll...

--- End quote ---

This seems like a workable approach as well, what function  do you use to load the working/updated dll?

Navigation

[0] Message Index

[#] Next page

Go to full version