Hi, On Tue, Mar 29, 2011 at 4:15 PM, Jack Pappas <[email protected]> wrote: > // Load an F# assembly (e.g., FSharp.Core) > // The bug also occurs in some cases when C# projects reference an F#- > based assembly > string TargetAssemblyPath = @"C:\Program Files (x86)\Reference > Assemblies\Microsoft\FSharp\2.0\Runtime\v2.0\FSharp.Core.dll"; > AssemblyDefinition FSharpAsmDef = > AssemblyDefinition.ReadAssembly(TargetAssemblyPath, new > ReaderParameters(ReadingMode.Immediate)); > > // Pause before writing > Console.WriteLine("Press any key to save the assembly..."); > Console.ReadKey(); > > // Try to save the assembly to the current user's desktop > // A StackOverflowException should occur in GenericParameter (it gets > caught in an infinite loop) > FSharpAsmDef.Write(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), > "Cecil-" + System.IO.Path.GetFileName(TargetAssemblyPath))); > > // If we get here, everything worked > Console.WriteLine("Save successful. Press any key to exit."); > Console.ReadKey();
I can't reproduce this. When I run your code, I get «Save successful. Press any key to exit.». Please make sure you update properly your cecil copy to 7bb6a70e0595fb38a4ff0b1539d4c06bd8200387, which is the current tip of master. Jb -- -- mono-cecil
