Do you ever use a separate app domain?

I’m working to improve SolidDna again.

I’m having a hard time reaching my goals when I have to take the Detached App Domain into account. Do you ever use it? SolidWorks seems to have a bunch of bugs when you use it. I’m tempted to delete the entire option of a detached app domain.

2 Likes

Sorry for being ignorant about this but can you define what a detached app domain is? Are you talking about newing new Systems.Windows.Application in your SOLIDWORKS add-in?

1 Like

Yeah sorry, only SolidDna calls it that. I mean whether you start your add-in under its own AppDomain.

1 Like

@PeterBrinkhuis That SolidDna is a huge framework. Can you list some of the issues you are facing with SolidDna, maybe I will have some pointers for you.

Having your own app domain is actually a good idea. You don’t have worry about assembly resolution problems, You can new your own Wpf application and have your own resources and not worry about any other add-ins throwing exceptions.

If you are unhappy with SolidDna. It is better to switch to a maintained framework like xcad.

I have been thinking about creating an open source framework for SOLIDWORKS that rivals that of @artem :wink: . Let me know if you are interested in a collaboration. Only condition is that it remains open source perpetually.

The main issue I have with it is that it’s designed to run one add-in. Since my customers would like to use two or more of my products, that’s an issue.

I ran into SolidWorks bugs years ago when I tried to run in a separate app domain, so I haven’t tried since.

I built a version that runs multiple add-ins, but that has two issues:

  • I don’t understand app domains well enough to rework the existing code.
  • Luke isn’t responsive, so even if I get it to work, it won’t get merged for months or longer.

So I have finally, after a year of preventing myself to do so, forked the entire thing yesterday:

I have already applied all of my proposed bug fixes that were sitting in PRs. Then I’ll get the thing on NuGet, rework it for multiple add-ins and quite possibly remove the separate app domain option.

1 Like

I currently have no intention to switch to xCAD because the source code isn’t documented and hard to read. Only the user side is documented. I like the idea of the framework and PMPs really did need a rethink, but it’s not there yet.

My add-ins make heavy use of SolidDna, so that’s also a factor :grimacing:

1 Like

If you could add two simple add-ins in the forked repo that actually do the problem you are facing, I will take a look.

Thanks for the offer :slight_smile: Luke from SolidDna just emailed me (he actually responded!) saying I could rip out the AppDomain stuff. So suddenly, that’s also an option again. I’ll keep you posted.

2 Likes

Post your findings here!

I have created multiple addins on the same machine without any problems. I never used any framework.
So if you made one addin and then added different commands to it, that wouldn’t work?
Say your Drew had another command in it that would do the work of your second product? You would just need to renew commandGroup IDs for the new revisions.

SolidDna cannot run multiple add-ins right now. That’s a known issue that I know how to fix. I just need the repo owner to accept it.

My question is about app domains, though.