This project is read-only.

TypeLoadException using MonoTouch

Jun 3, 2011 at 5:14 PM

Hi,

I would like to use SharpBox 1.03.261 with MonoTouch 4.03 on a Mac.

In the download of SharpBox I found these assemblies which I added to my MonoTouch project:

AppLimitCloudComputingoAuthMonoTouch.dll
AppLimitCloudComputingSharpBoxMonoTouch.dll
Newtonsoft.Json.Net20.dll

Then I try to run the following code:

            DropBoxCredentials credentials = new DropBoxCredentials();
            credentials.ConsumerKey = "myKey";
            credentials.ConsumerSecret = "mySecret";
            credentials.UserName = "myName";
            credentials.Password = "myPassword";
          
            DropBoxConfiguration configuration = DropBoxConfiguration.GetStandardConfiguration();
            CloudStorage storage = new CloudStorage();
            ICloudStorageAccessToken token = storage.Open(configuration, credentials);

Running this code result in the following Exception:

System.TypeLoadException: Could not load type 'System.Json.JsonReader' from assembly 'System.Json, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

Do I have to use different assemblies for MonoTouch? Or does it simply not run under MonoTouch? Running the same code (with the windows assemblies of SharpBox) under Windows 7 runs fine...

I would be very thankful for any kind of help!

Thanks,

Jan

By the way: I tried to recompile the SharpBox sources with MonoDevelop and MonoTouch. Doing so results in a build error:

Error CS0246: The type or namespace name `JsonReader' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (AppLimit.CloudComputing.SharpBox.MonoTouch)

Jun 4, 2011 at 7:45 AM
I'm not sure, it looks like the Json parser is missing (why ever?). Can you try to build the coe on your machine?

Thanks
Dirk

2011/6/3 JanJunius <notifications@codeplex.com>

From: JanJunius

Hi,

I would like to use SharpBox 1.03.261 with MonoTouch 4.03 on a Mac.

In the download of SharpBox I found these assemblies which I added to my MonoTouch project:

AppLimitCloudComputingoAuthMonoTouch.dll
AppLimitCloudComputingSharpBoxMonoTouch.dll
Newtonsoft.Json.Net20.dll

Then I try to run the following code:

DropBoxCredentials credentials = new DropBoxCredentials();
credentials.ConsumerKey = "myKey";
credentials.ConsumerSecret = "mySecret";
credentials.UserName = "myName";
credentials.Password = "myPassword";

DropBoxConfiguration configuration = DropBoxConfiguration.GetStandardConfiguration();
CloudStorage storage = new CloudStorage();
ICloudStorageAccessToken token = storage.Open(configuration, credentials);

Running this code result in the following Exception:

System.TypeLoadException: Could not load type 'System.Json.JsonReader' from assembly 'System.Json, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.

Do I have to use different assemblies for MonoTouch? Or does it simply not run under MonoTouch? Running the same code (with the windows assemblies of SharpBox) under Windows 7 runs fine...

I would be very thankful for any kind of help!

Thanks,

Jan

By the way: I tried to recompile the SharpBox sources with MonoDevelop and MonoTouch. Doing so results in a build error:

Error CS0246: The type or namespace name `JsonReader' could not be found. Are you missing a using directive or an assembly reference? (CS0246) (AppLimit.CloudComputing.SharpBox.MonoTouch)

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 4, 2011 at 9:26 AM

Hi Dirk,

thank you for your answer. Which Json parser do I need to use SharpBox with MonoTouch? There is a System.Json assembly which seems to be part of Mono, but this assembly does not contain a JsonReader class. Or do I have to use the Newtonsoft.Json.Net20.dll? If so, why is this assembly not included in the SharpBox solution (as reference) for MonoTouch?

What do you mean with coe?

Can you (or someone else) build the solution SharpBoxMonoTouch?

Thanks,

Jan

Jun 4, 2011 at 9:53 AM
HI,

and that is the currios thing :-( This was part of the monoTouch 3.X series.

If this was removed in 4.X I have to adapt the code. Please open an issue I will try to fix it in the next days, sorry.

Dirk


2011/6/4 JanJunius <notifications@codeplex.com>

From: JanJunius

Hi Dirk,

thank you for your answer. Which Json parser do I need to use SharpBox with MonoTouch? There is a System.Json assembly which seems to be part of Mono, but this assembly does not contain a JsonReader class. Or do I have to use the Newtonsoft.Json.Net20.dll? If so, why is this assembly not included in the SharpBox solution (as reference) for MonoTouch?

What do you mean with coe?

Can you (or someone else) build the solution SharpBoxMonoTouch?

Thanks,

Jan

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 4, 2011 at 4:29 PM

hallo, yes i've the same problem. I've update to monotouch 4.0 and come back to me an error :

"

 

Unhandled Exception: System.TypeLoadException: Could not load type 'System.Json.JsonReader' from assembly 'System.Json, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
  at AppLimit.CloudComputing.SharpBox.DropBox.Objects.DropBoxToken..ctor (System.String jsonString) [0x00000] in <filename unknown>:0
  at AppLimit.CloudComputing.SharpBox.DropBox.Logic.DropBoxApplication.AuthorizeAndGetSession (System.String userName, System.String password) [0x00000] in <filename unknown>:0
  at AppLimit.CloudComputing.SharpBox.DropBox.Logic.DropBoxApplication.Authorize (System.String userName, System.String password) [0x00000] in <filename unknown>:0
  at AppLimit.CloudComputing.SharpBox.DropBox.DropBoxStorageProvider.Open (ICloudStorageConfiguration configuration, ICloudStorageCredentials credentials) [0x00000] in <filename unknown>:0
  at AppLimit.CloudComputing.SharpBox.CloudStorage.Open (ICloudStorageConfiguration configuration, ICloudStorageCredentials credentials) [0x00000] in <filename unknown>:0

 

"

 

bya nad tnx

Jun 10, 2011 at 9:12 AM

hallo,

there is new for this issue ?

 

bye and tnx.

Jun 10, 2011 at 9:21 AM

Heard nothing so far :-(

I hope there will be a fix soon.

Jan

Jun 10, 2011 at 5:06 PM
Hi,


So you have to check our our trunk branch and compile the solution SharpBoxMonotouch.sln by your own. This fix will be part of the 1.1 release!

Thanks
Dirk


2011/6/10 JanJunius <notifications@codeplex.com>

From: JanJunius

Heard nothing so far :-(

I hope there will be a fix soon.

Jan

Read the full discussion online.

To add a post to this discussion, reply to this email (sharpbox@discussions.codeplex.com)

To start a new discussion for this project, email sharpbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 15, 2011 at 11:08 AM

opsss.. thanks so much. Great

Nov 8, 2011 at 10:45 PM

I'm trying to implement in monotouch, is there any documentation on how to use?

Any help wold be appreciated

 

TIA

Fred

Nov 9, 2011 at 7:26 AM
Hi,

we have a Mono Touch Solution in our code and we have a iPhone DropBox Browser App as well in the source code. Try to check the code out and you will see ;-)

Cheers
Dirk

Sent from my iPad

On 08.11.2011, at 23:45, fredbest <notifications@codeplex.com> wrote:

From: fredbest

I'm trying to implement in monotouch, is there any documentation on how to use?

Any help wold be appreciated

TIA

Fred