1
votes

i m working with MonoDevelop. I tried using Twitterizer, as well as tweetsharp but both gives error. My MonoDevelop version is 2.8.2. When the application launches i get the following error.

Could not load 'Newtonsoft.Json' for registration. This could be due to an outdated assembly kept by the simulator, location: /Users/apple/Projects/test/test/bin/iPhoneSimulator/Debug/Newtonsoft.Json.dll

And when i try to access the Twitter api i get the following error

Could not load type 'System.Diagnostics.Trace' from assembly 'Hammock'.

1
Just a thought but isn't whats provided with iOS 5 sufficient for your twitter requirements? - jamie

1 Answers

4
votes

Could not load 'Newtonsoft.Json' for registration. This could be due to an outdated assembly kept by the simulator

Your first error message makes me think you're using MonoTouch, right ?

If so then you cannot use Newtonsoft.Json.dll as is. This assembly requires some features that are not possible on iOS devices (e.g. dynamic runtime code generation).

There is a special Newtonsoft.Json.MonoTouch.dll version that you can use. Make sure to build it from the latest sources to get all the fixes.

i get the following error Could not load type 'System.Diagnostics.Trace' from assembly 'Hammock'.

Also you cannot (in general) re-use assemblies compiled with a different framework version since it can include types that are not available in MonoTouch base class library. To avoid this you should build your code from source or find a MonoTouch-ready assembly.