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

SOLVED
Go to solution
ShawnA54
Campaign Expert
0 Votes

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
DaveBerard
Employee
0 Votes

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
DaveBerard
Employee
0 Votes

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
ShawnA54
Campaign Expert
0 Votes

Thank you, worked perfect.

 

Now I am getting one more error. :wink:  I will start a new thread.

Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

Polls
How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (66%)