Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

WP8 Photon Issues

Discussion in 'Windows' started by ThiagoDeserto, May 29, 2014.

  1. ThiagoDeserto

    ThiagoDeserto

    Joined:
    Dec 13, 2012
    Posts:
    6
    Hi everyone,

    I'm facing a problem when buinding a game to WP8.

    Code (csharp):
    1. Error building Player: Exception: Error: method `System.Collections.Generic.IEnumerator`1<System.Collections.DictionaryEntry> ExitGames.Client.Photon.Hashtable::GetEnumerator()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void NetworkingPeer::OnEvent(ExitGames.Client.Photon.EventData).
    2.  
    3. Error: method `System.Collections.Generic.IEnumerator`1<System.Collections.DictionaryEntry> ExitGames.Client.Photon.Hashtable::GetEnumerator()` doesn't exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void NetworkingPeer::OnEvent(ExitGames.Client.Photon.EventData).
    I noticed the error is caused on method OnEvent of NetworkingPeer.cs.
    So I commented the methoed content just to test if the game is going to build, knowing that Photon should not work properly.
    After that unity could build the game to WP8 but now is crashing on splashscreen.

    Code (csharp):
    1. +      ExceptionObject   {System.IO.FileLoadException: Could not load file or assembly 'Photon3Unity3D, Version=3.2.2.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    2. File name: 'Photon3Unity3D, Version=3.2.2.1, Culture=neutral, PublicKeyToken=null'
    3.   at UnityEngine.Internal.Types.$UnityType249..ctor()
    4.   at UnityEngine.Internal.$Metadata.GetUnityType(Int32 id)
    5.   at UnityEngine.Internal.$MethodUtility.GetUnityType(Int32 id, IntPtr method)}   System.Exception {System.IO.FileLoadException}
    I'm using:
    Unity3D: 4.5.0
    Photon Unity Network: 1.25.2
    Windows 8.1
    Windows Phone 8.1 SDK
    Nokia Lumia: 620 and 920

    If someone have any clue, workaround or tips, please let me know.

    Thanks,
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,507
    Hi,

    could you check that the DLL version of "Assets\Plugins\Photon3Unity3d.dll" and "Assets\Plugins\WP8\Photon3Unity3d.dll" matches exactly? You can do it with ILSpy:

    http://ilspy.net/

    This usually happens when you are trying to use a non matching DLL on the phone and on the editor. Assembly Name, Version and Culture must match on both.
     
  3. ThiagoDeserto

    ThiagoDeserto

    Joined:
    Dec 13, 2012
    Posts:
    6
    Thank you so much Tautvydas.

    You're right. The versions were different even reimporting everything.
    I have to delete all folders of the plugin and re-import / setup from zero.
    They also provided a specific unitypackage for WP8, that would fix the build problems.

    Thanks again for the support.
    Thiago Deserto