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

MEP BDS Standard SP2. AecArchMgd.dll Broken?

5 REPLIES 5
Reply
Message 1 of 6
jshimkus
414 Views, 5 Replies

MEP BDS Standard SP2. AecArchMgd.dll Broken?

Running MEP Building Design Suite Standard 2015, Win 8.1 64 bit. (also broke under Win 7 64 bit).

 

I have several VB Dot Net programs that run fine with MEP 2015 and SP1 but when I upgraded to SP2 I now get the following VB Dot Net error :

Could not load file or assembly AecArchMgd, Version=7.7.104 on one machine, and on another I got Could not load file or assembly AecArchMgd, Version=7.7.208.

 

I have attached a capture of the error message. 

 

5 REPLIES 5
Message 2 of 6
jshimkus
in reply to: jshimkus

We have a workaround solution for our issue but something definately changed in SP2.

 

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.

 

For future reference, Is there a different way that demand loading should be done now? 

Message 3 of 6
moogalm
in reply to: jshimkus

 

I'm not totally aware of MEP BDS, but as your query posted in AutoCAD .NET , I take bit liberty to put few comments.

 

Yes ,within ACAD -SP2 we are not resolving assemblies ,developers need to hook an assembly event , find & send the necessary assemblies when the particular event is called.

 

For example:

        Private Shared Function OnAssemblyResolve(sender As Object, args As ResolveEventArgs) As Assembly
            Dim assembly As Assembly = Nothing
            Dim assems As [Assembly]() = AppDomain.CurrentDomain.GetAssemblies()
            Dim shortName As String = args.Name.Split(New [Char]() {","}).GetValue(0)

         ' Threadsafe is some dependent DLL  
 Dim threadSafe As String = "ThreadSafe"
 
            'check that the assembly being asked for is one of ours and if it is not, then return nothing
            If shortName <> threadSafe Then
                Return assembly
            End If
 
 
            For Each assem In assems
                If assem.GetName.Name = shortName Then
                    Return assem
                End If
            Next assem
 
            'if assembly is not loaded ,we 'll explictly load this may not be required
            Dim an = New AssemblyName(args.Name)
            If an.Name <> args.Name Then
                assembly = DirectCast(sender, AppDomain).Load(an.Name)
            End If
 
 
            Return assembly
        End Function

 

 

Message 4 of 6
moogalm
in reply to: moogalm

If you feel ,your issue is particular to MEP BDS ,try to post in the relevant forum page.

Thank you.

Message 5 of 6
dschrock42
in reply to: moogalm

We have actually run into this same issue except with an objectARX program built off of ACA. I think you are misunderstanding the issue. The issue is that AutoCAD can no longer resolve its own dll. Specifically AecArchMgd.dll. This dll is missing in the AssemblyMap in the registry, thus if you have an assembly that references AecArchMgd.dll then it will fail to resolve unless either you change the autocad AssemblyMap registration entry, which is frowned upon, or you add code in our program to resolve an AutoCAD dll for autocad. My Assembly resolves fine but can't load because it can't resolve AecArchMgd.dll. So this is most likely a side affect of turning off resovling of assemblies.
Message 6 of 6
moogalm
in reply to: dschrock42

Hi Thanks for your clarification ,

 

I understand that AutoCAD is not able resolve its vertical DLL's[AecArchMgd.dll] , my earlier answer was on plain vanilla autocad to resolve user created DLL's[ DLLs generated using objectARX .NET API].

 

I think it is better you post this query on ACA forum ,

http://forums.autodesk.com/t5/autocad-architecture/ct-p/56

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