TypeLoadException when using Yielder


With Ix-Main from the NuGet package, trying to use Yielder as in this example ( https://gist.github.com/mausch/5241729 ) throws a TypeLoadException:
Unhandled Exception: System.TypeLoadException: Inheritance security rules violated while overriding member: 'System.Linq.Yielder`1<T>.UnsafeOnCompleted(System.Action)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
   at System.Linq.EnumerableEx.<Create>d__a6`1.MoveNext()
   at System.Linq.Enumerable.ElementAt[TSource](IEnumerable`1 source, Int32 index)
   at ConsoleApplication21.Program.Main(String[] args) in g:\prg\ConsoleApplication21\ConsoleApplication21\Program.cs:line 15
Earlier I copied the code from this diff ( http://rx.codeplex.com/SourceControl/changeset/8f1e73bca96e ) instead of using the NuGet package and the same example worked fine.


davedev wrote Oct 9, 2014 at 4:27 PM