Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / March 2004

Tip: Looking for answers? Try searching our database.

TypeLoadException : Typ System.Windows.Forms.Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Johnson - 28 Feb 2004 11:08 GMT
.NET Framework.Compact SP2 : Pocket PC 2002

I have created a Designer support DateTimePicker with CultureInfo support.
Following the instructions explained at :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/
customctrlscompactfx.asp


I got this to work in the Emulator.

However when I run the program on my Maschine (XDA I - Pocket PC 2002 -
German) I recieve the following error
when the program starts:
TypeLoadException the Typ "System.Windows.Forms.Control" of the Assembly
"System.Windows.Forms, Version=1.0.5000.0,Culture=neutral, ....

The resulting .dll is copied to the Program Files Directory togeather with
the .exe

In the AssemblyInfo.cs :

[assembly: AssemblyCulture("")]
#if DESIGN
[assembly:
System.CF.Design.RuntimeAssembly("mj10777.DateTimePicker,Version=1.0.1.0,
Culture=neutral, PublicKeyToken=null")]
#endif

The goal is for this Control to run on all Maschines without further
changes.

This error also accured with the project found in the link above (Emulator
OK ; Maschine failed).

What could the cause be?

Mark Johnson, Berlin Germany

mj10777@mj10777.de
Mark Johnson - 29 Feb 2004 14:11 GMT
I have noticed that this aloso happens on the Emulator when SP2 has been
installed.
After a coldstart this does not happen.

Mark Johnson, Berlin Germany
mj10777@mj10777.de

> .NET Framework.Compact SP2 : Pocket PC 2002
>
> I have created a Designer support DateTimePicker with CultureInfo support.
> Following the instructions explained at :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/
customctrlscompactfx.asp


> I got this to work in the Emulator.
>
[quoted text clipped - 27 lines]
>
> mj10777@mj10777.de
"Stan Adermann [Msft]" - 02 Mar 2004 23:21 GMT
Mark,

What is the PublicKeyToken in the TypeLoadException message?  Also, have
you verified that NETCF installed correctly?  (Does a simple form run?)

Stan Adermann
Developer
Microsoft .NET Compact Framework

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

--------------------
| From: "Mark Johnson" <mj10777@mj10777.de>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
[quoted text clipped - 11 lines]
| NNTP-Posting-Host: 213.23.144.161
| X-Trace:
DXC=[GQH3_VOU]8LL2:TY8[@n6Q5U85hF6f;4jW\KbG]kaM8lSE5DYV?ad1dd`6]ThL^^8KgWG2b
RR9h>7[[mB2>@P@9VLMQgIHm1:9
| X-Complaints-To: abuse@arcor-online.net
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!newsfeed.freenet.de!newsfeed.tiscali.ch!feed1.news.be.easynet.net!newsf
eed.arcor-online.net!newsread.arcor-online.net!news.arcor.de!not-for-mail
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:47230
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
[quoted text clipped - 9 lines]
| > I have created a Designer support DateTimePicker with CultureInfo support.
| > Following the instructions explained at :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
tml/customctrlscompactfx.asp

| > I got this to work in the Emulator.
| >
[quoted text clipped - 12 lines]
| > #if DESIGN
| >  [assembly:

System.CF.Design.RuntimeAssembly("mj10777.DateTimePicker,Version=1.0.1.0,
| > Culture=neutral, PublicKeyToken=null")]
| > #endif
[quoted text clipped - 10 lines]
| >
| > mj10777@mj10777.de
Mark Johnson - 03 Mar 2004 06:21 GMT
PublicKeyToken=B77A5C561934E089

Everything else works correctly.
The source of this Control where the .cs file is included in a Project runs
correctly.
Only when included as Control does it fail with SP2 (Emulator/Mashine), SP1
runs correctly on Emulator.

This also happens (same PublicKeyToken) with the project found at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/
customctrlscompactfx.asp


Mark Johnson, Berlin Germany
mj10777@mj10777.de

> Mark,
>
[quoted text clipped - 23 lines]
> | NNTP-Posting-Host: 213.23.144.161
> | X-Trace:

DXC=[GQH3_VOU]8LL2:TY8[@n6Q5U85hF6f;4jW\KbG]kaM8lSE5DYV?ad1dd`6]ThL^^8KgWG2b
> RR9h>7[[mB2>@P@9VLMQgIHm1:9
> | X-Complaints-To: abuse@arcor-online.net
> | Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin

e.de!newsfeed.freenet.de!newsfeed.tiscali.ch!feed1.news.be.easynet.net!newsf
> eed.arcor-online.net!newsread.arcor-online.net!news.arcor.de!not-for-mail
> | Xref: cpmsftngxa06.phx.gbl
[quoted text clipped - 13 lines]
> support.
> | > Following the instructions explained at :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
> tml/customctrlscompactfx.asp
> | >
[quoted text clipped - 32 lines]
> | >
> | > mj10777@mj10777.de
"Stan Adermann [Msft]" - 04 Mar 2004 00:00 GMT
This PublicKeyToken belongs to the desktop framework; correct NETCF
references have PKT=969db8053d3322ac.  There was a bug where we would
resolve desktop references like this in v1 RTM and SP1 which was fixed in
SP2.  Unfortunately, this makes some libraries which appeared to work
correctly before fail under SP2.

MSDN article you are following is attempting to show you how to combine a
desktop project with a smart device project, which is a bit dangerous.  You
have to be very careful to reference ONLY Compact Framework libraries or
you will get the problem you are seeing.  Also note that this article
references pre-RTM NETCF (version 1.0.3300.0), and not everything in it is
guaranteed to be up to date.

Stan Adermann
Developer
Microsoft .NET Compact Framework

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

--------------------
| From: "Mark Johnson" <mj10777@mj10777.de>
|
[quoted text clipped - 7 lines]
|
| This also happens (same PublicKeyToken) with the project found at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
tml/customctrlscompactfx.asp

| Mark Johnson, Berlin Germany
| mj10777@mj10777.de
[quoted text clipped - 10 lines]
| > support.
| > | > Following the instructions explained at :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
| > tml/customctrlscompactfx.asp
| > | >
[quoted text clipped - 17 lines]
| > | > #if DESIGN
| > | >  [assembly:

System.CF.Design.RuntimeAssembly("mj10777.DateTimePicker,Version=1.0.1.0,
| > | > Culture=neutral, PublicKeyToken=null")]
| > | > #endif
[quoted text clipped - 11 lines]
| > | >
| > | > mj10777@mj10777.de

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.