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

AutoCAD 2025 BC31019 Error

24 REPLIES 24
Reply
Message 1 of 25
peter_harrison
2396 Views, 24 Replies

AutoCAD 2025 BC31019 Error

I am updating my custom programs for Autocad 2025 using Visual Studio 2022. I have updated the autocad references to the 2025 version & now on a re build I get the error:

import of type MarshalByRefObject from assembly or module System.Runtime.dll failed

 

24 REPLIES 24
Message 21 of 25
_gile
in reply to: ziggy63


@ziggy63 wrote:

Hi Alfred,

I don't understand why I have to upgrade my project (upgrade to what?). All those years, with every new version of AutoCAD, all I had to do was to update the references, replacing the corresponding dll files with those of the current version. That' s what I have been doing since AutoCAD 2013 and that's what I did in AutoCAD 2025. What has changed?


Please, read this page from AutoCAD 2025 Developer's Documentation.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 22 of 25
ziggy63
in reply to: _gile

Thank you, Gilles, I will check it out.
George
Message 23 of 25
norman.yuan
in reply to: ziggy63


@ziggy63 wrote:

Hi Alfred,

I don't understand why I have to upgrade my project (upgrade to what?). All those years, with every new version of AutoCAD, all I had to do was to update the references, replacing the corresponding dll files with those of the current version. That' s what I have been doing since AutoCAD 2013 and that's what I did in AutoCAD 2025. What has changed?


While you "...have been doing (AutoCAD .NET API programming) since AutoCAD 2013...", you probably did not pay enough attention to the latest change of Microsoft's .NET technology's and Autodesk's AutoCAD .NET API changing, starting from AutoCAD 2025: moving from .NET framework (4.x) to .NET 8 (.NET Core). 

 

For your existing .NET plugin, based on .NET Framework, they may still work OK with AutoCAD 2025, but you cannot debug the code with AutoCAD 2025 any more, unless you UPGRADE the Visual Studio project to use .NET 8 (then, the newly build DLL will only run with Acad2025 or later).

 

Norman Yuan

Drive CAD With Code

EESignature

Message 24 of 25
cadtown
in reply to: ziggy63

Hi, did you finally find a solution to this problem ?... I am having the same issue.  Thanks in advance for reply.

Message 25 of 25
ziggy63
in reply to: cadtown

Hi @cadtown,

 

Yes, I managed to upgrade my old 4.8 Framework projects to 8.0 .NET, using the Upgrade Assistant, and finally everything worked fine. After the upgrade, don't forget to update the assemblies in the "Dependencies" of each project:

 

ziggy63_0-1716966044485.png

 

Maybe you should also take a look at the guide @_gile has created.

Good luck!

Ziggy63

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report