Search Unity

System.Collections.Specialized.NameValueCollection doesn't exist in target framework.

Discussion in 'Windows' started by rohitgoyal, Jul 24, 2013.

  1. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    Hi I am getting this error while building the player for Windows Phone 8. The error come during Postprocessing Player

    Error building Player: Exception: Error: type System.Collections.Specialized.NameValueCollection doesn't exist in target framework. Error: type System.Collections.Specialized.NameObjectCollectionBase doesn't exist in target framework.

    While looking at http://msdn.microsoft.com/enus/libr...specialized.namevaluecollection(v=vs.80).aspx this clearly support System.Collections.Specialized.NameValueCollection . :confused:


    The error is repeated uncountable number of times. Someone please help me out with this. :(
     
  2. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
  3. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    Ohh! I am sorry I don't know why the link is not working.

    But just choose .Net2.0 in other version as that's what Unity uses and it shows System.Collections.Specialized.NameValueCollection supported there.
     
  4. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Nope, afaik Unity uses mono 2 for other platforms but Windows 8 ones use different .net framework.
     
  5. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    I got exactly the same error in the post processing phase. What plug-ins or frameworks do you use? May it be related to NGUI or some Prime31 plugin?
     
  6. Harry1960

    Harry1960

    Joined:
    May 15, 2007
    Posts:
    136
    Removing all Prime31 stuff from my project solved that issue.
     
  7. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    I have removed the whole plugin folder from my project but still getting the same error. I am using JavaScript.
     
  8. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    Go into Player setting for Windows Phone 8 in Unity 4.2
    In the last line in "Other Settings" there is an option of API compatibility option.
    There it clearly shows .Net 2.0
     
  9. Harry1960

    Harry1960

    Joined:
    May 15, 2007
    Posts:
    136
    I removed all Prime31 stuff from the plugins and editor folders.
     
  10. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    Removed everything from editor too but still getting the same error. :(
     
  11. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    In my case, the problem is gone when I deleted the P31Reskit.dll from the Plugins folder.
     
  12. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    I have only restsharp.dll in my plugins folder which is a default dll of Unity. And my Editor folder is empty. Can you suggest where might be the problem.
     
  13. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    I don't have restsharp.dll in my plugins folder. Did you try deleting it?
     
  14. iossif

    iossif

    Joined:
    Mar 4, 2011
    Posts:
    332
    deleting all prime31 stuff fixed it for me.
     
  15. rohitgoyal

    rohitgoyal

    Joined:
    Jul 24, 2013
    Posts:
    13
    Previously I wasn't able to delete the restsharp.dll but this time I was able to delete it and it worked. :)

    For anyone who is having the same problem clean up your plugin folder and editor folder and it should work.
     
  16. unleech

    unleech

    Joined:
    Jul 27, 2013
    Posts:
    17
    dont forget to delete p31restkit.dll

    deleted almost all plugins, but im sure that the culprit is prime31
     
  17. karanvir

    karanvir

    Joined:
    Aug 12, 2013
    Posts:
    24
    Thanks all you guys. But in my case I have to delete JSon.dll file along with prime31 and then the problem is solved. Anybody who is still facing the same problem can do this also, and it might be helpful.:D
     
  18. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Chiming in here for all your folks enjoying the wonderful API changes Microsoft decided to force on any store apps. Have a look at the General section of our Windows Store documentation for a proper fix. The relevant section in there is entitled Special Note About Windows Store and Windows Phone Crazy DLL Handling