How to use .NET 4

Options
vbprogr
edited January 2014 in DotNet
I need to use .NET 4 for Photon Sever. I receive this message in log:
ERROR PhotonHostRuntime.PhotonDomainManager - AssemblyResolve: Failed to load file ... This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

How can I fix it?

Comments

  • chvetsov
    Options
    hi, vbprogr

    you may find this lines in server config

    <Runtime
    Assembly="PhotonHostRuntime, Culture=neutral"
    Type="PhotonHostRuntime.PhotonDomainManager"
    CLRVersion="v4.0"
    UnhandledExceptionPolicy="Ignore">
    </Runtime>

    CLRVersion="v4.0" - this is what you are looking for.
  • Error:
    7788: 16:46:18.506 - About to load CLR - versions available:
    7788: 16:46:18.506 - v2.0.50727
    7788: 16:46:18.506 - v4.0.30319
    7788: 16:46:18.506 - Configuration requests: "4.0"
    7788: 16:46:18.506 - About to load version: "4.0"
    7788: 16:46:18.506 - ~CManagedHost
    7788: 16:46:18.506 - CService::OnException() - Exception: CManagedHost::Start() - Failed to load version "4.0" of the CLR
    7788: 16:46:18.506 - Server shutting down...
  • There was "2.0" without "v". I had to specify "v" before "4.0". Now it works, thanks!