TypeLoadException

P

Pablo Montilla

Hello everyone.

I have an application that's divided in 5 assemblies, 2 of wich are
written in J# (I'm writing an abstraction layer, so I can program in
Java for a non dot net compatible device), the rest in very lightweight C#.

I could make the application work, drawing some lines driven from the J#
side of the app, so I know I can execute J# code (without accessing the
vjslib).

Now, I've written a bit more of code that works perfectly in Javaland,
but now I'm getting a TypeLoadException while running the app, and I'm
not getting info about wich is the offending assembly:

A managed TypeLoadException occurred at ?::?+0x0

OK to terminate.

Any idea how can I debug this? It's driving me nuts!! I had this problem
before because I was using a non CF compatible version of a
System.Drawing.Graphics method, but I can't see to find where is the
problem now...How can I get a better error message?

Many thanks,
Pablo
 
D

Damon Payne

Do you have the ability to run your program via the debugger? Set the
debugger to break on all CLR exceptions, that might give you an idea of
what is not loading properly.
 
P

Pablo Montilla

Damon said:
Do you have the ability to run your program via the debugger? Set the
debugger to break on all CLR exceptions, that might give you an idea of
what is not loading properly.
I've done some more tests, adding manual references to types in the
different assemblies, and now I think I know wich assembly is the one
that with troubles.

But, I don't have any idea as to why it doesn't work...it simply makes
the exception appear. The output in VS tells me it's being copied, but
it seems the CF Assembly loader can't see it.

Any idea as to what may be causing a compiling assembly not to load?

Thanks,
Pablo
 
A

Alex Feinman [MVP]

Pablo Montilla said:
I've done some more tests, adding manual references to types in the
different assemblies, and now I think I know wich assembly is the one that
with troubles.

But, I don't have any idea as to why it doesn't work...it simply makes the
exception appear. The output in VS tells me it's being copied, but it
seems the CF Assembly loader can't see it.

Any idea as to what may be causing a compiling assembly not to load?

Sure, things like referencing a desktop assembly. Open your assembly in
ildasm and check what it references
 
I

Ilya Tumanov [MS]

J# is not supported on Compact Framework. Only C# and VB.Net are supported.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Date: Mon, 02 May 2005 16:09:42 -0300
From: Pablo Montilla <[email protected]>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050317 Thunderbird/1.0.2 Mnenhy/0.7.1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top