TypeLoadException
Up to Bugs & Problems
TypeLoadException
Compiling and profiling a C# application for the Windows Mobile 6 Professional (Visual Studio 2005) platform, and running it on the Professional Emulator.
After profiling the application, the application crashes with "TypeLoadException". There is no documentation to describe what this is, or why it happened. When your profiling tool is removed and the application is compiled and deployed normally, the application runs from end to end without incident.
Torin Walker
torinw@quickplay.com
After profiling the application, the application crashes with "TypeLoadException". There is no documentation to describe what this is, or why it happened. When your profiling tool is removed and the application is compiled and deployed normally, the application runs from end to end without incident.
Torin Walker
torinw@quickplay.com
That's actually the first bug I've heard of (or seen, even though I've profiled tons of various assemblies) for our 1.1 release. Interesting!
By the way I assume you are running the 1.1 release, right? An app profiled with version 1.0 could cause this exact TypeLoadException if a signed assembly had been profiled, because the app would likely refuse to load the unsigned profiled assembly. So in 1.1 we explicitly skip signed assemblies until we've added a way to re-sign them.
Could I ask you to:
- See if you can reproduce the problem on a smaller scale and send us a source example
- Or, submit as much info about the problem as possible from the error-dialog; call-stack, types involved etc
- Or, submit the offending assembly-files to us to inspect
- Or, submit your entire offending source code project to us. We'll treat it confidentally.
If there's anything special about your app then that would be useful to know, too.
Thanks,
Richard
Re: TypeLoadException
HI,
I'm facing exactly the same Problem.
TypeloadException in MyMain.Program
No Callstacks etc available.
A quick glance show the following:
Target Device: Windows CE 6.0 R2 , .Net Compact Framework 3.5
App-Target: .Net Compact Framework 3.5
EQATEC-Runtime Target: .Net (FULL) 2.0.0.0 !!!
.Net 2.0 does not exist on my Target Device!
Hope it helps.
If you give me an email address I will send you the resulting profile-exe and runtime assembly.
Regards,
Ulrich
Ulrich.Strauss AT dynavisions.com
I'm facing exactly the same Problem.
TypeloadException in MyMain.Program
No Callstacks etc available.
A quick glance show the following:
Target Device: Windows CE 6.0 R2 , .Net Compact Framework 3.5
App-Target: .Net Compact Framework 3.5
EQATEC-Runtime Target: .Net (FULL) 2.0.0.0 !!!
.Net 2.0 does not exist on my Target Device!
Hope it helps.
If you give me an email address I will send you the resulting profile-exe and runtime assembly.
Regards,
Ulrich
Ulrich.Strauss AT dynavisions.com
Re: TypeLoadException
Hi Again,
forget the last report.
Problem is the following:
If Profiler-Instrumentation has an error and you deploy it anyway you will get the TypeLoadException.
In my case, profiler tried to instrumentate an unmanaged dll (even it was NOT checked, erm not even listed in the list of files) and bailed out with an error.
After fixing this the TypeLoadException went away.
-Ulrich
forget the last report.
Problem is the following:
If Profiler-Instrumentation has an error and you deploy it anyway you will get the TypeLoadException.
In my case, profiler tried to instrumentate an unmanaged dll (even it was NOT checked, erm not even listed in the list of files) and bailed out with an error.
After fixing this the TypeLoadException went away.
-Ulrich
I'm glad it went away, but not too sure what caused it. Because:
If profiling fails (like, an output-file is readonly or whatever) then the resulting runtime-module will be constructed to throw an explicit exception telling you that "hey, I told you the profiling failed, so please run it properly". It shouldn't cause a TypeLoadException.
Also I'm not quite sure what you mean when you say the profiler tried to instrument an unmanaged DLL and bailed out with an error? Unmanaged DLLs should simply be skipped (they will just cause an info-notice in the log-window, not a warning) even if they are marked for profiling.
If profiling fails (like, an output-file is readonly or whatever) then the resulting runtime-module will be constructed to throw an explicit exception telling you that "hey, I told you the profiling failed, so please run it properly". It shouldn't cause a TypeLoadException.
Also I'm not quite sure what you mean when you say the profiler tried to instrument an unmanaged DLL and bailed out with an error? Unmanaged DLLs should simply be skipped (they will just cause an info-notice in the log-window, not a warning) even if they are marked for profiling.
Powered by
Ploneboard





