TheSwamp

Code Red => .NET => Topic started by: cadwiki.net on January 29, 2022, 09:53:46 PM

Title: How to reload a .dll into AutoCAD without closing or restarting
Post by: cadwiki.net on January 29, 2022, 09:53:46 PM
I recently built a solution that allows reloading the same copy of a .dll into AutoCAD without closing or restarting.
This way developers can test their changes without closing and restarting AutoCAD.

Check out my blog with the full solution:

http://www.cadwiki.net/blogpost/How-to-reload-a-.dll-into-AutoCAD
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: cadwiki.net on August 12, 2022, 03:08:45 PM
I recently released cadwiki's first nuget package with a package that allows AutoCAD developers to reload dll's

blog post
http://www.cadwiki.net/blogpost/cadwiki.DllReloader-nuget-package

example repo
https://github.com/cadwiki/cadwiki-nuget-examples

nuget package
https://www.nuget.org/packages/cadwiki.DllReloader
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: It's Alive! on August 16, 2022, 08:12:24 AM
Cool stuff.
Will this shutdown loaded reactors, or is IExtensionApplication.Terminate() called for the app being unloaded?
I’m not using .net at the moment, just wondering
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: Jeff H on August 16, 2022, 09:01:15 AM
This is a problem people have wanted a solution to, thanks for putting in the effort and sharing.
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: kdub_nz on August 17, 2022, 04:20:01 AM
This is a problem people have wanted a solution to, thanks for putting in the effort and sharing.


Yes, but I'm happy restarting and auto-loading the rebuilt assembly.  . . . becoming more patient with age, and use the time to re-evaluate expectations.

Pity it's not in a language I'm more comfortable with.  :)
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: It's Alive! on August 17, 2022, 05:14:15 AM
This is a problem people have wanted a solution to, thanks for putting in the effort and sharing.


Yes, but I'm happy restarting and auto-loading the rebuilt assembly.  . . . becoming more patient with age, and use the time to re-evaluate expectations.

Pity it's not in a language I'm more comfortable with.  :)

Things are different in the SSD age, if you're coding on a 5400rpm spinner... wonder if my u.s. robotics 56k modem still works
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: 57gmc on August 17, 2022, 10:26:35 AM
This is a problem people have wanted a solution to, thanks for putting in the effort and sharing.


Yes, but I'm happy restarting and auto-loading the rebuilt assembly.  . . . becoming more patient with age, and use the time to re-evaluate expectations.

Pity it's not in a language I'm more comfortable with.  :)

Things are different in the SSD age, if you're coding on a 5400rpm spinner... wonder if my u.s. robotics 56k modem still works
That's mezozoic! ;-)
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: kdub_nz on August 17, 2022, 04:46:39 PM
This is a problem people have wanted a solution to, thanks for putting in the effort and sharing.


Yes, but I'm happy restarting and auto-loading the rebuilt assembly.  . . . becoming more patient with age, and use the time to re-evaluate expectations.

Pity it's not in a language I'm more comfortable with.  :)

Things are different in the SSD age, if you're coding on a 5400rpm spinner... wonder if my u.s. robotics 56k modem still works
That's mezozoic! ;-)

Hi Ed,
I'm mesozoic , but my SSD isn't :)
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: daboho on August 29, 2022, 07:51:44 AM
This for all autocad version ?
Title: Re: How to reload a .dll into AutoCAD without closing or restarting
Post by: cadwiki.net on September 11, 2022, 12:53:45 PM
Hey all, I've been away for awhile, figured it was time to send some responses.
Thanks for the feedback, it is very helpful!
Let's keep the chat going with any new ideas or insights.
Here's a new article to help folks just getting started with this nuget package:
http://www.cadwiki.net/blogpost/nuget-examples-start-here


Cool stuff.
Will this shutdown loaded reactors, or is IExtensionApplication.Terminate() called for the app being unloaded?
I’m not using .net at the moment, just wondering

I haven't added any features to shutdown reactors.
Also, this nuget package doesn't unload anything.
It reloads .dlls into AutoCAD's app domain.

This is a problem people have wanted a solution to, thanks for putting in the effort and sharing.


Yes, but I'm happy restarting and auto-loading the rebuilt assembly.  . . . becoming more patient with age, and use the time to re-evaluate expectations.

Pity it's not in a language I'm more comfortable with.  :)

Jeff H: you're welcome, glad it's useful.
kdub: what langauge would you like to see supported in the future?

This for all autocad version ?
Daboho: I have only tested this on AutoCAD 2021, let me know if you find bugs on other versions.