The type or namespace name 'Json' does not exist in the namespace 'System.Runtime.Serialization'

SOLVED
Go to solution
Frequent Participant

The type or namespace name 'Json' does not exist in the namespace 'System.Runtime.Serialization'

I need to build the Constant Contact C# library against .net 3.5 because that is what we are currently using.  When I switch to 3.5 and try to build I get the following error:

The type or namespace name 'Json' does not exist in the namespace 'System.Runtime.Serialization' (are you missing an assembly reference?)


It can no longer find JSON under System.Runtime.Serialization.  What can I do to fix this?  This is in the Component.cs and Extensions.cs file.

Thanks
Mike

1 ACCEPTED SOLUTION
Moderator

In 3.5, the System.Runtime.Serialization.Json reference needs to have the a special assembly added as a reference.  The actual code is in the System.ServiceModel.Web assembly.  You would need to add this as a reference manually.   You can see this documentation for 3.5 for more information: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer...

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

2 REPLIES 2
Moderator

In 3.5, the System.Runtime.Serialization.Json reference needs to have the a special assembly added as a reference.  The actual code is in the System.ServiceModel.Web assembly.  You would need to add this as a reference manually.   You can see this documentation for 3.5 for more information: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer...

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

Frequent Participant

Thank you, worked perfect.

 

Now I am getting one more error. ;)  I will start a new thread.

Developer Portal

View API documentation, code samples, get your API key.

Visit Page