A .NET Compact Framework application may generate a System.TypeLoadException exception when the application uses the Microsoft.WindowsMobile.Telephony assembly on a Smartphone device (914793)
The information in this article applies to:
- Microsoft Windows Mobile 5.0 software for Smartphone
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base: 256986 Description of the Microsoft Windows registry SYMPTOMSWhen
you run a Microsoft .NET Compact Framework-based application that uses the
Microsoft.WindowsMobile.Telephony assembly on a Smartphone device, the
application may generate a System.TypeLoadException exception.CAUSEThis
problem occurs because the Microsoft.WindowsMobile.Telephony assembly is not
correctly installed in the global assemble cache in Microsoft Windows
Mobile 5.0 for Smartphone. A TypeLoadException exception occurs when the
Microsoft.WindowsMobile.Telephony assembly is loaded. RESOLUTIONWarning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk. To resolve this problem, you must add the following two entries to the registry: Location: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\Installer\Assemblies\Global]
Type: Multi-String
Name: Microsoft.WindowsMobile.Telephony, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Value: "\Windows\GAC_Microsoft.WindowsMobile.Telephony_v1_0_0_0_cneutral_1.dll","Microsoft.WindowsMobile.Telephony.dll"
Location: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\Installer\Assemblies\ROM]
Type: Multi-String
Name: Microsoft.WindowsMobile.Telephony, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Value: "\Windows\GAC_Microsoft.WindowsMobile.Telephony_v1_0_0_0_cneutral_1.dll","Microsoft.WindowsMobile.Telephony.dll"
You may also use Microsoft Visual Studio 2005 to manually add these entries to a Smart Device CAB project. Or you may add these entries by including them in the RegKeys section of an .inf file that produces a CAB file. To do this, use the following formatting: [RegKeys]
"HKLM","Software\Microsoft\.NETCompactFramework\Installer\Assemblies\ROM","Microsoft.WindowsMobile.Telephony, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","0x00010000","\Windows\GAC_Microsoft.WindowsMobile.Telephony_v1_0_0_0_cneutral_1.dll","Microsoft.WindowsMobile.Telephony.dll"
"HKLM","Software\Microsoft\.NETCompactFramework\Installer\Assemblies\Global","Microsoft.WindowsMobile.Telephony, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","0x00010000","\Windows\GAC_Microsoft.WindowsMobile.Telephony_v1_0_0_0_cneutral_1.dll","Microsoft.WindowsMobile.Telephony.dll"
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 4/11/2006 |
---|
Keywords: | kbinfo kbfix kbBug kbprb KB914793 kbAudDeveloper kbAudITPRO |
---|
|