Hello,

This is likely because your assembly refers to types that does not
exists in MonoTouch base class libraries. That would result in a
TypeLoadException at runtime (and in this case the error message you
see would be wrong).

As a general rule you need to re-compile assemblies to make them work
with MonoTouch. Doing so will ensure the assembly will be usable (or
at least loadable) at runtime. In the case of Newtonsoft.Json you'll
find that it requires modification to build properly. You can find an
already adapted version in [1] (note: make sure to use the latest
code, not the existing binaries, to avoid issues outside the
simulator).

Regards,
Sebastien

[1] https://github.com/chrisntr/Newtonsoft.Json

On Fri, Nov 18, 2011 at 4:29 PM, Diniden <lasermat...@yahoo.com> wrote:
> Hello I am trying to use a common JSON dll in my monotouch project. I add it
> into my references and monodevelop recognizes the dll just fine; however,
> when I compile the project I get this in the application output:
>
> Could not load 'Newtonsoft.Json' for registration. This could be due to an
> outdated assembly kept by the simulator, location:
> /Projects/AddedReferences/Newtonsoft.Json.dll
>
> I have tried deleting the project completely from the simulator and
> rebuilding, but nothing seems to get the compiler to be happy with the dll.
>
> Is there something I'm missing or should do to fix this problem? Thanks for
> any help!
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/dll-file-not-loading-for-registration-tp4084804p4084804.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to