question

rimply avatar image
rimply asked

Trouble integrating PlayFab C# SDK with DarkRift server

I've recently been learning how to develop a multiplayer game with an authoritative server outside of Unity, and using DarkRift has been quite easy so far. Now I want to have the server to connect to PlayFab, so I downloaded the C# SDK. My problem is that when I build "PlayFabServerSDK" into a .dll, add it to the server's plugins folder, and then run the server, I get the following error in the console:


[Error] Plugin E:\DarkRift Server\Plugins\PlayFabServerSDK.dll failed to load:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at DarkRift.PluginManager.LoadPluginsFromFolder()
11/5/2016 01:43:43 AM [Trace] Exception trace PluginManager.LoadPlugins
11/5/2016 01:43:43 AM [Error] System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image
1807605288 answered

Our C# SDK is built using the Newtonsof.Json nuget package.

In your project, go to references, and click "Manage NuGet Packages..."
Browse
Find and install "Newtonsoft.Json"

Our project is set to use "v6.0.3", and the latest version is "v8.03".  So, this is pretty far out of date.  If you experience any problems using the newer version of Newtonsoft.Json, please let us know.

An extra note about importing a DLL:  You can use the dll, or you can copy the PlayFab Sdk source code into your project, whichever is easier for you.  Both should work, though the dll might be a little better for updating your PlayFab Sdk in the future.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rimply avatar image
rimply answered

The plugin is working fine now, thank you!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.