I am attempt to use dotnetfiddle to demonstrate a simply Castle Windsor edge case.
When it tries to run this code:
var container = new WindsorContainer()
.Register(Component.For<TestClass>()
.LifeStyle.Singleton
.OnDestroy(t => t.ByeBye())
);
We get an error:
Run-time exception (line 42): Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
Stack Trace:
[System.TypeLoadException: Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.] at Program.Main(String[] args): line 42
Is there some was we can get Castle Windsor running in .NET fiddle?
The .NET fiddle share is here: https://dotnetfiddle.net/crBGpt