jeme commented on issue #872: URL: https://github.com/apache/lucenenet/issues/872#issuecomment-1752822826
> This will only affect .NET Framework/.NET Standard 2.0 users - so this is all legacy. Previously the code was under MIT and now it has either a Community or Commercial license. > > ConditionalWeakTable is missing the enumerator prior to .NET Standard 2.1 and newer versions cannot be back ported because it ties directly into the GC in native code. This is the reason why we went with weak events in the first place. See #613. Porting it is a dead end. > > There are at least 3 options: > > 1. Leave the current dependency. If someone wants to upgrade, let them deal with the licensing. Presumably, they won't be upgrading unless they have a license, anyway. > 2. Go to a commit in Prism that had an MIT license and copy the weak event code into the Support/Util/Events folder (in the namespace Lucene.Net.Util.Events) and add the headers as specified in the [prior license](https://github.com/PrismLibrary/Prism/blob/7ca126dcddbad026d087b42f8c16914af12d7fcd/LICENSE). There are only a few types that we depend on and it is all pure C# code. All of the types should be made internal. > 3. Adapt the weak events to use [WeakEventManager](https://learn.microsoft.com/en-us/dotnet/api/system.windows.weakeventmanager?view=windowsdesktop-7.0) in .NET Framework (See [Weak event patterns](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/events/weak-event-patterns?view=netdesktop-7.0)) and remove the dependency on the Prism.Core package. This would require us to drop support for .NET Standard 2.0, but this is something we are considering doing anyway. Just wanted to add my thoughts on the .NET Framework/Standard statement. I don't think .NET Framework is as legacy as one would think, that is a really sad fact but it turns out that its more difficult to migrate than what many could hope for :(. So I think there are more allot of projects out there stuck on .NET 4.X that are still maintained. With regards to .NET Standard 2.0, I think there are many cases that one may not be aware of, I was certainly made aware as part of a Castle.Windsor discussion a while back that it's a really useful target for e.g. Library authors or if you where sitting on a "Core" version one step prior to a supported one, e.g. if one would choose to support .NET 6, 7 etc but not 5 and down, people on 5 and down could use that. So I would not cut that away so hastily. I know I was at least convinced by that discussion that it was to soon to discard support for it, and that perhaps one should discard support for .NET 4.X before that. (It would become supported as part of supporting .NET Standard) Ofc. this has to be weighed against the burden to maintain it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org