'System.Type' does not contain a definition for 'Assembly'

skylessskyless USMember
edited November 2014 in Cross Platform with Xamarin

Hi everybody !

I'm hoping someone can help me on this : because of the usage of System.Net.Http package, I'm not anymore able to load an embedded resource with var assembly = GetType (MyClass).GetTypeInfo ().Assembly;. I think this has something to do with the PCL associated profile which is the default one "Profile78", no ? Do you have any idea to get around this problem ?

Thx in advance for your help ! =)

Best Answer

Answers

  • Did you solve this issue? I have run into the same error :(

  • skylessskyless USMember

    Unfortunately, nope =S

  • MarkDownesMarkDownes USUniversity ✭✭

    I'm having the same issue, even with a brand new Xamarin Forms multiproject solution with no other assemblies/nuget packages referenced. Has anyone figured this out?

  • Was this ever resolved??

  • skylessskyless USMember

    Not yet ... =S

  • UrenPatelUrenPatel USUniversity

    I ran into the same error and fixed buy trageting Silverlight 5 in my PCL. Hope that helps.

  • dpedrinhadpedrinha DEMember ✭✭✭

    Try adding using System.Reflection;

  • CaseyBoyleCaseyBoyle USMember

    System.Type no longer contains property 'Assembly'...

    As an alternative:

    using System.Reflection;
    var type = typeof(whatever);
    type.GetTypeInfo().Assembly

Sign In or Register to comment.