.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FATAL ERROR / Cannot load assembly AecArchMgd.dll

8 REPLIES 8
Reply
Message 1 of 9
mathieuc1771
611 Views, 8 Replies

FATAL ERROR / Cannot load assembly AecArchMgd.dll

Hello everyone,

 

I've rewritten from scratch a .NET module that read and write from property sets attached on spaces. Everything went fine (it still runs fine on my computer) until I had to deploy it on other workstations. When I run it without a debugger running I get this error message:

 

screenshot_ERREUR_FATALE.png

 

And when I have a debugger attached I get this error message (a lot more helpful if you ask me):

 

screenshot_unable_to_load_assembly.png

 

Do I have anything special to do in my code (I already have all the required references loaded with Copy Local set to false) that I'm missing? I mean, wouldn't acad.exe have already loaded AecArchMdg.dll as part of it loading process? I'm a bit lost here, as I said it works just fine on my dev workstation. This is with AutoCAD Architecture 2015 SP2.

 

Thanks!

 

Mathieu

8 REPLIES 8
Message 2 of 9
mathieuc1771
in reply to: mathieuc1771

screenshot_ERREUR_FATALE.png 

 

 

Message 3 of 9
mathieuc1771
in reply to: mathieuc1771

screenshot_unable_to_load_assembly.png

Message 4 of 9
jshimkus
in reply to: mathieuc1771

same here.

see my post http://forums.autodesk.com/t5/net/mep-bds-standard-sp2-aecarchmgd-dll-broken/td-p/5365701

 

Based on the AecArchMgd.dll file version 7.7.208.0 it looks like you have updated to SP2.

In my case thats what broke my programs.

In SP1, file version 7.7.104.0, my programs ran fine.

 

I know this does not help but its more information for you.

Welcome to the club, hopefully one of us will get an answer. 

 

Message 5 of 9
mathieuc1771
in reply to: jshimkus

That helps more than you think! At least now I can rule out the fact that it is my lousy coding that is to blame! 😉 At first I was writing my code against a "no service pack" AutoCAD Architecture install until I noticed that my users were running SP2. Now my code still runs fine after an update to SP2 on my workstation but I get this error on every other workstations I've tried so far.

Message 6 of 9
jshimkus
in reply to: mathieuc1771

So it runs fine now on your SP2 machine?

Are you running the program in Debug or the release? 

Message 7 of 9
jshimkus
in reply to: mathieuc1771

We have a solution for our issue!

 

In the 2 programs that we have been getting this error with we were demand loading another dll using "system.reflection.assembly.loadfile("filename")".

 

We commented this line out, rebuilt the release, then restarted MEP and BEFORE running the program that was erroring, we manually netloaded the program that we were previously demand loading.

Then when the program was run it ran without errors.

 

So it seems that demand loading with "system.reflection.assembly.loadfile("filename")" no longer loads the file under SP2 for some reason.

 

Our workaround is simply to netload the required Dll's with lisp code added to our "Acad.lsp" file.

 

Hope this helps.

 

Message 8 of 9
mathieuc1771
in reply to: jshimkus

It was always running fine on my workstation, for whatever reason it is crashing on other workstations (the workstations I need to deploy my single DLL on). I don't load any other DLLs other than the ones I am referencing in my C# project so your solution doesn't quite apply to me. I can trigger this even when I manually load the DLL (I usually load it in a .lsp that is autoloaded as well). I do hope that it is something stupid on my side but I just can't tell. The only difference between my workstation and the other workstations is that on the other workstations there were other installs of AutoCAD and workspaces were copied over but we're all upgraded to SP2 and all...
Message 9 of 9
mathieuc1771
in reply to: mathieuc1771

Still, thanks for sharing your solution! Hopefully it can help others!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost