How to make an application plugin which can work with AutoCAD 2025 & lower versions?

How to make an application plugin which can work with AutoCAD 2025 & lower versions?

luckyboy82292
Advocate Advocate
1,772 Views
3 Replies
Message 1 of 4

How to make an application plugin which can work with AutoCAD 2025 & lower versions?

luckyboy82292
Advocate
Advocate

Hi everyone!

 

As you read the title. Is it possible to make an application plugin which works with all versions? I have made a plugin which loads in 2025 but didn't load in 2024. Any help will be greatly appreciated.

 

Thank you!

0 Likes
Accepted solutions (1)
1,773 Views
3 Replies
Replies (3)
Message 2 of 4

_gile
Consultant
Consultant

Hi,

 

It seems that some plugin DLLs built with .NET Framework 4.8 and AutoCAD 2024 (or earlier) libraries work as is with AutoCAD 2025. But as far as I know, a DLL built with .NET 8.0 and AutoCAD 2025 libraries cannot work with earlier version.

 

That said, I prefered migrate all my plugins (i.e. built new projects targeting .NET 8.0).

You can have both projects (.NET Framework and .NET 8.0) in the same solution. You can also share the same code between both projects by linking the .cs files but this way you be stack to .NET Framework and C# 7.0 features.

 

If you want to be able to use new features from .NET 8.0 and C# 12.0 in the AutoCAD 2025 project, you'll have to maintain two separated codes, this is the way I choose. To deploy such plugin, the use of the Autoloader mechanism with a .bundle folder makes things easier: simply specify in the PackageContents.xml file which DLL is loaded according to the AutoCAD version (you can see an example of this achitecture with the Inspector plugin).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 4

luckyboy82292
Advocate
Advocate

Thank you for your response. So, I should use the UPGRADE option and create another copy of the application to ensure compatibility with both CAD versions.

0 Likes
Message 4 of 4

_gile
Consultant
Consultant
Accepted solution

Sorry if my explaination was not clear (English is not my native language).

I'll try a step by step explaination.

 

Assuming you have a plugin which works as you expect with AutoCAD 2024 or earlier. Try to NETLOAD this DLL into AutoCAD 2025 and deeply test your plugin. If it works as expected, you're done.

 

If it does not, you have create a new plugin for AutoCAD 2025 (and later) targeting .NET 8.0 and AutoCAD 2025 libraries. This can be done:

- either by upgrading the .NET Framework project using the migration assistant (as shown here)

- or by creating a brand new project in the same solution starting from a class library (.NET or .NET Standard template) and adding the code files from the .NET Framework project.

 

In both cases, you can:

- either try to share the same code in both projects (either choosing "side-by-side incremental project upgrade" or "Add as link" the source code files)

- or have different codes in each project (either choosing "side-by-side project upgrade" or simply "Add" the source code files).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes