question

asim@offroadstudios.com avatar image
asim@offroadstudios.com asked

(Resolved)The type or namespace name `Linq' does not exist in the namespace `PlayFab.Json'. Are you missing an assembly reference?

HI, 

    I have been stuck in a problem for last 2 days, I have downloaded the sample push notification unity package , after installing playfab sdk when I install the package everything goes fine but when I build it for Android I get these two Errors which I am unable to resolve. Kindly help

 

1 ==>   The type or namespace name `Linq' does not exist in the namespace       `PlayFab.Json'. Are you missing an assembly reference?

2 ==>   foreach statement cannot operate on variables of type `object' because it does not contain a definition for `GetEnumerator' or is not accessible

10 |1200

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

brendan avatar image
brendan answered

We made a pretty significant change to the SDK when we updated the JSON serialization library. This looks like the kind of error you might get on an upgrade, if you were to copy the new SDK into your project directly. Can you try creating a new project using our current SDK (import the SDK folder fresh) and pull in your game code (but not the PlayFab SDK from that project)?

10 |1200

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

asim@offroadstudios.com avatar image
asim@offroadstudios.com answered

Well I have done that too but still , the error persists. It shows that the namespace I am using Playfab.json.linq is undefined, so could you please guide me how can I add this namespace to the project. The Unity I am using is Version 5.2.0 f3 

SDK I have downloaded is : https://api.playfab.com/sdks/unity/

The Push Notification Sample project I have downloaded is from here:  https://github.com/PlayFab/UnitySDK/tree/master/ClientExamples

Thanks,   

10 |1200

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

brendan avatar image
brendan answered

Ah, sorry for the confusion - those samples (in the ClientExamples folder) are out of date. I've asked the tools team to remove them from the SDK. Please use the samples from our "PlayFab-samples" repo in GitHub. For Push specifically, it's this one: https://github.com/PlayFab/PlayFab-Samples/tree/master/TestingTools/PushNotifications

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.