Search Unity

"System.Collections.SortedList" doesn't exist in target framework?

Discussion in 'Windows' started by Nerosam, Jul 23, 2013.

  1. Nerosam

    Nerosam

    Joined:
    Jul 23, 2013
    Posts:
    40
    I attempted to rebuild my unity project for the Windows Phone platform but for some reason keep running into this awkward error:-

    I also noticed that when switching to the WP platform, it does not show that in the title bar. All it shows is "unity - scene name.unity - Project name". Coincidence?

    I already have VS express for Windows Phone SDK installed.

    This error baffles me...surely .NET supports the System.Collections.SortedList class? how is it that it "does't exist"? Or have I done something wrong?

    Any help would be MUCH appreciated!

    Thanks:grin:
     
    Last edited: Jul 23, 2013
  2. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    Hi Nerosam,

    Unforunately, SortedList doesn't exist in Windows Phone 8 / Windows 8 land.

    Take a look here:

    Windows Phone 8 - http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207211(v=vs.105).aspx

    Windows 8 - http://msdn.microsoft.com/en-us/library/windows/apps/br230232.aspx

    This is a list of all the supported API's available to you to use in your game.

    Common issues are related to ArrayList, SortedList which should turn into a List; and Hashmap must be turned into a Dictionary<string, object>.

    For most cases you can do a find and replace and it should just work, replacing a SortedList with a List, but in plugins you will need to reach out to the developer or grab an updated version to fix it.

    -Kyle
     
  3. Nerosam

    Nerosam

    Joined:
    Jul 23, 2013
    Posts:
    40
    I see. I just did some more digging into it and found that one of my assets (FXMaker) is using it. As the developer has not yet updated it to support WP8, im attempting to make some DIY changes to the source files.

    Thanks
     
  4. Gucci Gagan

    Gucci Gagan

    Joined:
    Mar 28, 2013
    Posts:
    3
    any luck? I'm about to give it a go as well. I need this working for wp8!
     
  5. Gucci Gagan

    Gucci Gagan

    Joined:
    Mar 28, 2013
    Posts:
    3
    i figured it out.
    Just comment out the GetChildsSortList method in the NGObject.cs file