Photon .Net SDK starting up
I am trying to set up a c# project using Photon realtime .Net SDK.
I am following the steps here.
https://doc.photonengine.com/en-us/realtime/current/getting-started/project-setup
Upon extracting the archive I cannot follow these instructions.
"Afterwards we navigate to our previously extracted .NET Realtime SDK archive and go into /libs/Debug/, select all Photon3DotNet files and copy them into a Libs directory (you have to create this one) in our .NET project"
There are no Photon3DotNeyt files found there. There are instead 3 folders.
What is the next step?
I am following the steps here.
https://doc.photonengine.com/en-us/realtime/current/getting-started/project-setup
Upon extracting the archive I cannot follow these instructions.
"Afterwards we navigate to our previously extracted .NET Realtime SDK archive and go into /libs/Debug/, select all Photon3DotNet files and copy them into a Libs directory (you have to create this one) in our .NET project"
There are no Photon3DotNeyt files found there. There are instead 3 folders.
What is the next step?
0
Comments
IS this being actively supported? The forum looks dead.
This line in the example code seems to be the spot where the 'System.DllNotFoundException' in mscorlib.dll" is created.
MyClient client = new MyClient();
and executing this in the class constructor:
loadBalancingClient = new LoadBalancingClient();
I receive the following in Output
'ChipZ2.exe' (CLR v4.0.30319: ChipZ2.exe): Loaded 'C:\Users\xxxxx\Documents\Visual Studio 2017\Projects\ChipZ2\ChipZ2\bin\Debug\Photon-DotNet.dll'. Symbols loaded.
Exception thrown: 'System.DllNotFoundException' in mscorlib.dll
Exception thrown: 'System.DllNotFoundException' in mscorlib.dll
Exception thrown: 'System.DllNotFoundException' in mscorlib.dll
this.LoadBalancingPeer = new LoadBalancingPeer(this, protocol);
in LoadBalancingCLient.cs
private readonly Pool<Dictionary<byte, object>> paramDictionaryPool = new Pool<Dictionary<byte, object>>(() => new Dictionary<byte, object>(), x => x.Clear(), 1); // used in OpRaiseEvent() (avoids lots of new Dictionary() calls)
Attempting to step into this asks for a SupportClass.cs which is not supplied with the package.
It's annoying that the Conditional attribute does not help avoid the code to compile. I assume the compile define is not set? So I added proper #if conditions for the next release.
Which package do you use, by the way? The Photon C# SDK from our page? And you build for which platform and with which .Net SDK?
https://www.photonengine.com/en-us/sdks#sdkrealtimenet
As mentioned, I am trying to follow the instructions listed here:
https://doc.photonengine.com/en-us/realtime/current/getting-started/project-setup
But they do not match the current release. I am doing something wrong because as soon as I try to instantiate a MyClient object from the code here:
I get a dll not found error as given above.
John helped out below.
step1: fix error caused by leftover UNITY related code references, in LoadBalancingClient.cs (add #if wrappers or comment out lines in CheckConnectSetupWebGl and CheckConnectSetupXboxOne)
step2: fix DLL build output filename: renamed "libs\Debug\Photon-NetStandard.*" to "libs\Debug\Photon-DotNet.*", mainly .dll file (you could also do the same for "libs\Release"
build solution. it should work I just tested it.
Walking step by step through the instructions listed here:
Done.
Done, except that I am building a Windows Forms App
These do not exist. Precisely which files/folders should be copied?
Again, this dll does not exist. Which file specifically gets a reference added. (I did try adding a reference to the renames NetStandard.dll and it is missing the IConnectionCallbacks interface. The original "libs/Debug/net35/Photon_DotNey.dll seems to include the reference.
Done
A new class is made named MyClient from the example code provided.
With the file renamed, now when I attempt to run and instantiate a new MyClient object I get
"Exception thrown: 'System.IO.FileNotFoundException' in Chipz.exe
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Chipz.exe
Could not load file or assembly 'Photon-NetStandard, Version=4.1.4.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
Very strange.
Thank you for choosing Photon!
Your issue is different as it's about starting the Photon Server and not the Photon .NET client SDK.
You can search the right category or post something there.
If you are using Photon Server v5 you need a license.
Make sure to share server logs if you are going to start a new discussion.