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
@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.
@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
Hi, did you finally find a solution to this problem ?... I am having the same issue. Thanks in advance for reply.
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:
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.