Hey there again! I have a different type of issue this time, I'm generating a .dll file from scratch, filling up with types and methods that i've parsed from a text file, the .dll is built properly, all its types are in place, constructors work and calling methods on these types works aswell!
Well.. almost all methods! When I try to call a static method that i've generated, the compiler gives me the error stated in the subject. For example: 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; Instructions for this function: function.Body.Instructions.Add(Instruction.Create(OpCodes.Ret)); Other information relative to this, that is used: var function = new MethodDefinition(state.Name, MethodAttributes.Public, MainModule.TypeSystem.Void); function.IsStatic = true; var nPar = new ParameterDefinition(par.Name, ParameterAttributes.None, MainModule.TypeSystem.String); function.Parameters.Add(nPar); which is basically everything used for creating the function, so hopefully it might be enough information. However. It could be something completely different. Note: The same error comes up as soon as I try to use a static method in code (after referencing the built/generated .dll in a new project) All Non-Static methods works great. Any ideas? Best Regards, Karl Johansson -- -- -- 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.
