Could not load assembly Photon3Unity3D, version 4.0.0.4

cygnusprojects
edited January 2015 in DotNet
When building the example project demo-turnbased-memory with only the CustomAuthentication scene active for Windows Store following error pops up: Could not load file or assembly 'Photon3Unity3D, Version=4.0.0.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The bound assembly has a version that is lower than that of the request. (Exception from HRESULT: 0x80132000)
I'm using Unity 4.6.1f1 Pro and Visual Studio Express 2013. I tested on all possible build: debug, release and master but I'm not suceeding in running the build, the build itself compiles without problems though only execution is failing. Maybe an indicator on what could be happening is the fact that Visual Studio indicated to upgrade the generated Unity project from target Windows 8.0 to Windows 8.1 (which I did, ofcourse).

Any idea on how to get this going?

Comments

  • I think Unity can do a Windows 8.1 export. I would definitely use that over upgrading in VS.

    Next, there has to be a special variant of the Photon lib for Windows 8 in the project. It must be in the Assets\Plugins\Metro folder and must match (api-wise) the Photon3Unity3D.dll. I think that's not the case in all demos.

    There is a simple solution to fix those dlls. Open the SDK zip and find:
    <sdk>.zip\libs\Release\

    Copy those files to the Assets\Plugins folder, including all subfolders. Then move the content of Assets\Plugins\Plugins one folder up.
    You will have (next to other files and folders): Assets\Plugins\Metro and a dll in there.

    Export this as Win 8.1 build to a new, empty folder. Unity will copy the dll from the "Metro" folder into the generated project.
  • Thanks Tobias, I've forgot to change the dropdown in Unity to windows 8.1. Silly me!
    After copying the files everything works for me now.