Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2025 - ported code failing to show

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
nsandersonMKCFD
300 Views, 5 Replies

AutoCAD 2025 - ported code failing to show

Hi all,

 

I've spent the last few weeks porting our .NET Framework  4.8 VB.NET WinForm code over to .NET 8 using the Upgrade Assistant to support ACAD 2025. 

The code is a bit old (some was originally ported from VB6) but I've upgraded the COM Interop reference and the AcCoreMgd, AcDBMgd and AcMgd DLLs to those supplied by 2025.

 

I've made sure that all the SQL, ODBC, Windows Compatibility and so on NuGet packages are installed against the code (using latest stable versions for .NET 8) and all build successfully.

 

Now to AutoCAD 2025 - I have put all the output files for the DLLs (and also the deps.json files just in case?  Do I need those?) into a single directory on the build & target machine and modified the LISP file that works under .NET Framework to NETLOAD our DLLs so that it points to the new .NET 8 versions.

 

However, on trying to APPLOAD the LISP file into AutoCAD 2025, I get nothing.  The LISP file appears to load successfully, it says it's loaded successfully and it appears, greyed out, in the Loaded Applications tab.

But then, nothing - no errors, no warnings it just doesn't display our plug ins.

 

I have to admit, I'm new to .NET 8 (been a Framework coder since 1.1!) but is there something I'm missing to get this running on 2025 like it does under 2024?  Do I need to install the NuGet package DLLs somewhere (I though they were copied to the bin/Output folder when you build it?)

Just really wondering if anyone has experienced a similar issue and how you resolved it?

 

Many thanks

5 REPLIES 5
Message 2 of 6
cadffm
in reply to: nsandersonMKCFD

Hi,

 

.net programming and plugin packages are not part of the usual daily work of AutoCad-Users,

you should ask in the decided board for .net

https://forums.autodesk.com/t5/net/bd-p/152

 

Sebastian

EESignature

Message 3 of 6

Thanks.  I'll move it

Message 4 of 6

I don’t understand why you need LISP if you write .Net plugins.

As for the transition to net8, I described the process in detail here (this is a Russian-language forum, but you can use Google translator).

To load all libraries, you must first configure the project so that the necessary DLLs are copied to the destination folder (in the bundle folder of your plugin). And then you also need to load these DLLs in the initialization method via Assembly.LoadFrom(dll).


Plugins for AutoCAD
A>V>C>
AppStore | Facebook | Twitter | YouTube | Blog
Message 5 of 6

We're just using LISP to NETLOAD all the DLLs - nothing more than that and, as I said, it's exactly the same as the .NET Framework method.  That way we can automatically have the LISP file loaded on start-up and the user can see our ribbon by default.

I've copied all the output files from generating the .NET 8 code via VS2022 into a single folder - bit messy but without a GAC, it's a proof of concept.  Given all the support files and the plugins are in that same place, I kind of thought that should be enough.  Does NET 8 look for referenced files in its local folder?

 

More concerning is the lack of error messages - it just takes the LISP file and says everything's OK before not doing anything (I'd expect it to switch to our Ribbon at that point if it worked like 2024).  I even tried NETLOAD-ing one of the DLLs and it just returns back to the command line with no error displayed.

Message 6 of 6

There are bundle folders for downloading any plugins. LISP is completely unnecessary here.
In my experience, auxiliary libraries do not load themselves from the plugin folder (so where the main dll is located). You either need to copy the dll directly to the AutoCAD folder (which is very bad). Or force them to be loaded before the first access to their functions (Assembly.LoadFrom).


Plugins for AutoCAD
A>V>C>
AppStore | Facebook | Twitter | YouTube | Blog

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report