Microsoft Developer Network > Página principal de foros > Phoenix > Generate function calls a wrong type
Formular una preguntaFormular una pregunta
 

PreguntaGenerate function calls a wrong type

  • viernes, 11 de septiembre de 2009 3:22shootingsyh Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    I try to generate a function call in assembly A. The function defined in assembly B with a parameter of type T. The function is generated and get called. But it throw an Mechod not found exception that shows the function parameter is of type System.Reflection.AssemblyTitleAttribute.

    Unhandled Exception: System.MissingMethodException: Method not found: 'Void source.Class1.log(System.Reflection.AssemblyTitleAttribute)'.

    Does anyone know what happens here? what the system.reflecton.assemblyTitleAttribute? I define the log function with a parameter of type T. Why it is looking for such a type?

Todas las respuestas

  • martes, 29 de septiembre de 2009 7:08Andy Ayers - MSFTModeradorMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Likely the type T you have created is ending up with the the wrong token. There are some old posts on the forum here where I tried to show examples of creating various new types, and you need to be careful to create the required "scopes" for these types. If you dump out your resulting assembly with ILDASM you should be able to spot what is wrong.
    Architect - Microsoft Phoenix Project