mono/mono-addins

Mono.Addins on net6

deanmaoataristocrat opened this issue · 9 comments

Hi all, does Mono.Addins work on net6 platform. It goes an error, and it worked fine ion older platform (net472), but not net6 platform. Has anyone done it? It supports net standard 2.0, should support net6. Thanks

Got following errors:
System.InvalidOperationException: Add-in engine not initialized.
at Mono.Addins.AddinEngine.CheckInitialized()
at Mono.Addins.AddinEngine.get_Registry()
at Mono.Addins.AddinEngine.CheckHostAssembly(Assembly asm)
at Mono.Addins.AddinEngine.ValidateAddinRoots()
at Mono.Addins.AddinEngine.GetAddin(String id)
at Mono.Addins.TreeNode.ResetCachedData()
at Mono.Addins.TreeNode.ResetCachedData()
at Mono.Addins.TreeNode.ResetCachedData()
at Mono.Addins.ExtensionContext.ResetCachedData()
at Mono.Addins.AddinEngine.ResetCachedData()
at Mono.Addins.Database.AddinDatabase.ResetCachedData()
at Mono.Addins.Database.AddinDatabase.Shutdown()
at Mono.Addins.AddinRegistry.Dispose()
at Mono.Addins.AddinEngine.Shutdown()
at Mono.Addins.AddinManager.Shutdown()

Yes, it works on net6. You may be hitting a bug though.

Yes, it works on net6. You may be hitting a bug though.

Thanks for confirming. I will share my findings if I managed to get it working. :)

@slluis I think there is a bug in the code for Shutdown. it sets "initialized = false" first then doing disclose() and others, but "registry.Dispose();" will still check it. so it needs to happen at least after registry.Dispose ();
image

The code in CheckInitialized will be throwing exception:
image

so, we should do the check and clean up first, then set the initialized = false.

can you please make a change and release a new version? we actually need this, I believe it will help others. I have tested it and worked fine. thanks
image

Yes, this looks like a bug. I'll fix.

Hi @slluis, may I ask the tentative timeline for resolving this issue? It will help us plan our changes. Thanks!

Hi,

Any plan to release a new version for fixing this? Thanks,

Regards,

I'll try to do it this week.

Fixed by #208.