Dear Jb,

I found more about this issue:

When compiling with /clr:safe, the error does not happen.

It only happens when compiling with /clr:pure
In this case, the compiler emits a lot of helper structs and maybe
writing back one of them is causing the problem.

Since /clr:pure is 100% managed (not mixed mode) and is equivalent to
C# in unsafe mode, i guess Cecil should be able to read and write it
correctly?

Please take a look at this issue.



On Aug 18, 1:24 pm, JohnC <[email protected]> wrote:
> Here are the steps to reproduce the error:
>
> In Visual Studio 2005, create a new Visual C++ --> CLR --> CLR Console
> Application.
> Change project setting to /clr:pure
> Build project.
> Using SVN head version of Cecil, round-trip the assembly:
>             AssemblyDefinition ad = AssemblyFactory.GetAssembly(@"C:
> \Console\Debug\Console.exe");
>             AssemblyFactory.SaveAssembly(ad, @"C:\Output
> \Console.exe");
>
> When running the output assembly, I get a 'ComException : Record not
> found on lookup' error at startup.
>
> I researched this on web and there is not much info about this error,
> but it may be related to invalid characters in type names.
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to