Could be. Your best bet is to run peverify on the assembly, it will tell you if you're emitting something valid or not.
On Thu, Jan 23, 2014 at 10:32 AM, karl patrik johansson <[email protected]> wrote: > I have removed the function.Attributes = MethodAttributes... > completely, generating the .dll again, updated the reference for the new > project but still give me the same error. > > Is there any other reasons why this error could occour? > > Like, does it have anything to do with the defined Type that the function is > in? or even the AssemblyDefinition? > > Karl > > Den torsdagen den 23:e januari 2014 kl. 10:25:51 UTC+1 skrev Jb Evain: >> >> Hi, >> >> On Thu, Jan 23, 2014 at 10:18 AM, karl patrik johansson >> <[email protected]> wrote: >> > Error 8 'PapyrusDotNet.Core.Debug.MessageBox()' is not supported by the >> > language >> > C:\Users\Karlj\Dropbox\Projects\Active\PapyrusDotNet\TestDll\GodMode.cs >> > 26 4 >> > TestDll >> > >> > >> > the function >> > public static void PapyrusDotNet.Core.Debug.MessageBox(string msg) >> > is a empty method, as its just a dummy >> > >> > >> > Attributes used when creating the function: >> > function.Attributes = MethodAttributes.Public | >> > Mono.Cecil.MethodAttributes.FamANDAssem | >> > Mono.Cecil.MethodAttributes.Family >> > | Mono.Cecil.MethodAttributes.Static | >> > Mono.Cecil.MethodAttributes.HideBySig; >> >> That's 3 different visibility here. You're going to have to choose one :) >> >> Plus the bitflags are masked, so I suggest you use the properties. >> >> Also if you're doing: >> >> > var function = new MethodDefinition(state.Name, MethodAttributes.Public, >> > MainModule.TypeSystem.Void); >> > function.IsStatic = true; >> >> The .Attributes = line is superfluous. >> >> The rest looks good. >> >> Jb > > -- > -- > -- > mono-cecil > --- > You received this message because you are subscribed to the Google Groups > "mono-cecil" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
