views:

261

answers:

1

Hello there,

i am facing a problem in windows mobile 6. i have developed an app and i have used Timer class that is present in System.Threading namespace present in mscorlib.dll assembly. the problem is that when i debug it or when i deploy it by creating proper cab file from visual studio 2008 on my device (HTC ELF0300) it runs fine but when our client deploys it on his device (HTC Tilt 2) it gives TypeLoadException at System.Threading.Timer.ring(), after googling it alot and looking each and every assembly that i have referenced in my project into IL DASM and Object explorer of visual studio i have seen that the mscorlib.dll which was added in the cab project for deployment is missing with System.Threading namespace and the mscorlib.dll present in my main project is showing me System.Threading namespace in the object explorer. May be due to this our client is facing problem of TypeLoadException.

But i am still puzzled if the namespace is missing in the mscorlib.dll present in the cab file, than how the cab file is deployed and runs fine on my device(HTC ELF0300) but not on HTC Tilt2? What can i do to add the proper mscorlib.dll in my cab file?

any help will be greatly appreciated. thank you.

Zunair Minhas. http://www.tkxel.com/

+1  A: 

Has your client got the right version of the .NET Compact Framework installed on his device?

You shouldn't have to include mscorlib.dll in your CAB file, because it's part of the .NET Compact Framework and will be found on the user's device if he has got it installed correctly.

Ask your client if he can open File Explorer on his device and see if he can see the file cgautil.exe in the \Windows folder.

If he can see it, ask him to open it and check what version number he sees displayed on screen (2.0.xxxx, or 3.5.xxxx). That will be the version of the .NET CF he has installed.

If he can't see cgautil.exe he will not have the .NET CF installed and needs to install it before running your application.

tomlog
Is .net Compact Framework is installed with the OS for the device or we have to manually install it? i have checked the command cgacutil.exe and found my .net compact framework v2.0, it means it is installed with OS, is it? During testing and debugging visual studio had also installed .net compact framework 3.5 on the device, even after uninstalling the .net compact framework (the one visual studio installs) the app runs fine on my device. i am using .net compact framework 3.5 and windows mobile 6 professional sdk for the development. i will also ask the client to check on his device.
Zunair Minhas
i have also searched for the device the client is using (HTC Tilt2) and come to know that it is a smartphone and is installed with windows mobile 6.5 OS, and i have used windows mobile 6 professional sdk for the development. from msdn i have found the following supported platform chart(http://msdn.microsoft.com/en-us/library/ms172550.aspx). is the platform is also the issue?
Zunair Minhas
@Zunair: the .NET Compact Framework is installed on a lot of new phones, but not on all. It depends if the device manufacturer has decided to include it in the ROM or not.It could be an issue that your client has Windows Mobile Standard and you use Windows Mobile Professional. Please try to run your application in the Windows Mobile 6.5 Standard emulator for Visual Studio and see if your app runs without any problems.
tomlog