This project has moved. For the latest updates, please go here.


Unit Testing Windows Phone 8 loads incorrect assembly?


I have a WP8 project which has the following struct:
    public enum CardType
        [EnumMember(Value = "A")]
        Artist = 'A',

        [EnumMember(Value = "C")]
        Contemporary = 'C',

        [EnumMember(Value = "H")]
        Historical = 'H',

        [EnumMember(Value = "M")]
        Musician = 'M',

        [EnumMember(Value = "S")]
        Sports = 'S',

        [EnumMember(Value = "W")]
        Writer = 'W'
this runs perfectly fine in the app...

However, when I attempt to deserialize a string in a TEST project, it fails saying it's loading the wrong assembly ( when it should be

I've tried every combination of references and Copy Local and am at a complete loss. I ended up just mocking the Deserialize method to force a success, but is there something else I need to do to use this attribute in a windows phone unit test project?
Closed Oct 3, 2013 at 10:01 AM by JamesNK
Sorry I don't know.


SelArom wrote Sep 5, 2013 at 3:11 PM

I forgot to mention it's the EnumMember that's causing this to happen. on the WindowsPhone project it loads the correct WP8 assembly, but in my test project it's loading the standard .Net4 assembly

wrote Oct 3, 2013 at 10:01 AM