For some reason, PEVerify keeps giving me this error:
[IL]: Error: [C:\Documents and Settings\CodeLean\Desktop\Development
\LinFu\branc
hes\development\2.2\src\UnitTests\bin\Debug\output.dll :
LinFu.Proxy.SampleClass
WithPropertyInitializedInCtorProxy-013c537b6a344fa7abb7a158a53834ae::.ctor]
[offs
et 0x00000001][found <uninitialized> ref ('this' ptr)
'LinFu.Proxy.SampleClassWi
thPropertyInitializedInCtorProxy-013c537b6a344fa7abb7a158a53834ae']
call to .cto
r only allowed to initialize this pointer from within a .ctor. Try
newobj.
1 Error Verifying output.dll
Here's the IL dump of the constructor:
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method
'SampleClassWithPropertyInitializedInCtorProxy-013c537b6a344fa7abb7a158a53834ae'::.ctor
What makes this more puzzling is the that the default constructor IL
that C# generates is identical to the code listing above, and PEVerify
proceeds without any errors:
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method SampleClass::.ctor
The two method bodies are identical, and yet, PEVerify gives me two
distinct outputs. Does anyone know any way I can fix this error?
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---