TypeLoadException : Typ System.Windows.Forms.Control

M

Mark Johnson

..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/d...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

(e-mail address removed)
 
M

Mark Johnson

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
(e-mail address removed)
 
S

Stan Adermann [Msft]

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" <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| References: <[email protected]>
| Subject: Re: TypeLoadException : Typ System.Windows.Forms.Control
| Date: Sun, 29 Feb 2004 15:11:07 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Lines: 62
| Message-ID: <[email protected]>
| Organization: Arcor
| NNTP-Posting-Date: 29 Feb 2004 15:11:12 MET
| 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: (e-mail address removed)
| 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
|
| 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
| (e-mail address removed)
|
|
| | > .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/h
tml/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
| >
| > (e-mail address removed)
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
|
|
|
 
M

Mark Johnson

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/d...en-us/dnnetcomp/html/customctrlscompactfx.asp


Mark Johnson, Berlin Germany
(e-mail address removed)


"Stan Adermann [Msft]" said:
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" <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| References: <[email protected]>
| Subject: Re: TypeLoadException : Typ System.Windows.Forms.Control
| Date: Sun, 29 Feb 2004 15:11:07 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Lines: 62
| Message-ID: <[email protected]>
| Organization: Arcor
| NNTP-Posting-Date: 29 Feb 2004 15:11:12 MET
| 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: (e-mail address removed)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.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
|
| 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
| (e-mail address removed)
|
|
| | > .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/h
tml/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
| >
| > (e-mail address removed)
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
| >
|
|
|
 
S

Stan Adermann [Msft]

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" <[email protected]>
|
| 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/h
tml/customctrlscompactfx.asp
|
|
| Mark Johnson, Berlin Germany
| (e-mail address removed)
|
|
Newsbeitrag
| | > Mark,
| >
| > What is the PublicKeyToken in the TypeLoadException message? Also, have
| > you verified that NETCF installed correctly? (Does a simple form run?)
| >
| > --------------------
| > | From: "Mark Johnson" <[email protected]>
| > | | > | > .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/h
| > tml/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
| > | >
| > | > (e-mail address removed)
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|
 

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