Photon Cloud .Net SDK in Portable Class LIbrary
Options
in DotNet
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.
Hopefully I'm missing something obvious as I'm just getting started with Photon.
0
Comments
-
Sorry... Just noticed I posted in the PUN forum. Can a mod move/delete?0
-
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.0 -
I am working in straight .Net so Photon's Hashtable doesn't seem to be available.0
-
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?0 -
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:
Photon3DotNet
PhotonChatApi
PhotonLoadbalancingApi
I appreciate the responses.0 -
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.
See: https://msdn.microsoft.com/en-us/library/system.collections.hashtable(v=vs.110).aspx
Hope that helps.0 -
I wish that would work but Hashtable is missing from System.Collections in a portable project even when excluding Silverlight.0
-
Then it should be in the Portable Class Library. Can you include this?0