Visual Studio Developer Center > Visual Studio Forums > Phoenix > Generate function calls a wrong type
Ask a questionAsk a question
 

QuestionGenerate function calls a wrong type

  • Friday, September 11, 2009 3:22 AMshootingsyh Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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?

All Replies

  • Tuesday, September 29, 2009 7:08 AMAndy Ayers - MSFTModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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