WP8 Photon Issues

Hi everyone,

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

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).

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.

+      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)
File name: 'Photon3Unity3D, Version=3.2.2.1, Culture=neutral, PublicKeyToken=null'
   at UnityEngine.Internal.Types.$UnityType249..ctor()
   at UnityEngine.Internal.$Metadata.GetUnityType(Int32 id)
   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,

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:

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.

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