Photon Cloud .Net SDK in Portable Class LIbrary

I'm having trouble getting Photo running in a project that is built as a Portable Class Library because the System.Collections.Hashtable is not supported on portable libraries. It seems this is by design from Microsoft to phase out use of Hashtable in favor of a Dictionary or similar implementation. However, with Photon Cloud, I don't think there is an option for that.

Hopefully I'm missing something obvious as I'm just getting started with Photon.


  • Sorry... Just noticed I posted in the PUN forum. Can a mod move/delete?
  • JohnTube
    JohnTube mod
    edited October 2016
    Hi @RollerJesus,

    If you're working on Unity (PUN or Photon Unity SDK), please use Photon's Hashtable implementation:

    using Hashtable = ExitGames.Client.Photon.Hashtable;

    I need to check about Photon DotNet SDK.
  • I am working in straight .Net so Photon's Hashtable doesn't seem to be available.
  • The Photon.Hashtable is used in all Unity libraries to be cross platform compatible.
    We do not support Windows Phone 8.0 or Silverlight anymore. For all more modern versions, there should be a Hashtable definition in additional dlls, if it's really needed.

    Which SDK are you using in which environment?
  • The version I installed is Photon-DotNet-Sdk_v4-1-1-2.

    I'm not working in Unity and my build excludes Windows Phone and Silverlight. I've set the build options to target .NET Framework 4.5, ASP.NET Core 1.0 and Windows 8.

    I'm running VS 2015 Community on Windows 10 and I'm interfacing with the Photon Cloud from the Duality engine. The plugin I've developed for Duality is a portable class library and I'm unable to resolve Photon.Hashtable in my project.

    I have the following Photon related DLL's in my References:

    I appreciate the responses.
  • Tobias
    Tobias admin
    edited October 2016
    In "regular" DotNet, our Hashtable is not being used, as it's provided in the System namespace. It's simply not existing.
    The class needs to declare "using System.Collections" instead, to use that Hashtable. That should work.


    Hope that helps.
  • I wish that would work but Hashtable is missing from System.Collections in a portable project even when excluding Silverlight.
  • Then it should be in the Portable Class Library. Can you include this?