Hi,
I tried to use Sharp Develop with a VB.NET 2.0 project to program a Motorola MT 2090 barcode scanner. For this purpose I prepared SD to work with .NET 2.0 Compact Framework SDK and tried to first create a simple test application with a message box which could be successfully compiled and run in the SD environment so it seems to generally work.
Then I loaded one of the example projects from Motorola into SD which are very simple examples to scan an item. The loading was no problem, SD could identify anything (except two bitmap files in the resource folder but that's another thing). I tried to open one of the files which contains a screen and switched to the design mode which immediately resulted in the error I attached below.
The error is reproducable and the reason seems to be that Motorola has introduced some own controls to handle the mini keyboard on the scanner and more. There are three input textboxes and labels on the screen which works after "Continue" the error because they are normal controls. The two elements from Motorola with the class names "softKeys" and "titleBar" are locked and all properties are greyed out so it seems that they are the reason for the crash.
If you want to reproduce the error you would need to download and install the EMDK for .NET V2.8 which is available here:
After installing the sample projects will be installed to:
C:\Users\Public\Motorola EMDK for .NET\v2.8\Samples VS2005\VB\VB_MT2000_ScanInventory
where the last is the project which causes the error.
Would be great if there would be a solution, otherwise I will need to use Visual Studio 2008 which is the only other alternative to program this device.
The Motorola Scanner here is MT2090, but the EMDK in general is for a lot of Motorola scanners. The MT 2090 is a Windows CE 5.0 OS device which includes a barcode scanner, an imager, a little color screen and a little keyboard (like a mobile phone). The device is not connected to the computer at the time where this test was made. The OS is Windows 7/64 with installed Windows Mobile 6.1.
Cheers,
Christian
The error report:
SharpDevelop Version : 3.2.1.6466
.NET Version : 2.0.50727.5472
OS Version : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture : German (Germany) (de-DE)
Current UI language : en-US
Running under WOW6432, processor architecture: AMD64
Working Set Memory : 338444kb
GC Heap Memory : 208896kb
Unhandled exception
Exception thrown:
System.TypeInitializationException: The type initializer for 'Symbol.MT2000.UserInterface.InputForm' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Symbol.MT2000.Utils.SystemMonitor' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca' or one of its dependencies. The system cannot find the file specified.
File name: 'Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca'
at Symbol.MT2000.Utils.SystemMonitor..cctor()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at Symbol.MT2000.Utils.SystemMonitor.get_BatteryLevel()
at Symbol.MT2000.UserInterface.BaseForm.Reconfigure()
at Symbol.MT2000.UserInterface.InputForm.Configure(InputForm inputForm)
at Symbol.MT2000.UserInterface.InputForm..ctor()
at Symbol.MT2000.UserInterface.InputForm..cctor()
--- End of inner exception stack trace ---
at Symbol.MT2000.UserInterface.InputForm.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
---- Recent log messages:
15:42:15.913 [1] DEBUG - Forms designer: Initializing nested service container of softKeys [Symbol.MT2000.UserInterface.SoftKeys] using Reflection
15:42:15.913 [1] DEBUG - DefaultToolboxService:AddCreator(System.Drawing.Design.ToolboxItemCreatorCallback, CLSID, System.ComponentModel.Design.DesignerHost)
15:42:15.913 [1] DEBUG - DefaultToolboxService:AddCreator(System.Drawing.Design.ToolboxItemCreatorCallback, CF_XMLCODE, System.ComponentModel.Design.DesignerHost)
15:42:15.913 [1] DEBUG - DefaultToolboxService:AddCreator(System.Drawing.Design.ToolboxItemCreatorCallback, CF_NESTEDTOOLBOXITEM, System.ComponentModel.Design.DesignerHost)
15:42:15.920 [1] DEBUG - Forms designer: Initializing nested service container of EditForm [Symbol.MT2000.UserInterface.BaseForm], Text: using Reflection
15:42:15.929 [1] DEBUG - ResourceReader requested for culture:
15:42:15.932 [1] DEBUG - Forms designer: Load C:\Users\Public\Motorola EMDK for .NET\v2.8\Samples VS2005\VB\VB_MT2000_ScanInventory\EditForm.resx; inMasterLoadOperation=True
15:42:15.932 [1] DEBUG - Forms designer: Loading C:\Users\Public\Motorola EMDK for .NET\v2.8\Samples VS2005\VB\VB_MT2000_ScanInventory\EditForm.resx in resource store
15:42:15.935 [1] DEBUG - ResourceReader requested for culture:
15:42:15.937 [1] DEBUG - Forms designer: Initializing nested service container of label1 [System.Windows.Forms.Label], Text: using Reflection
15:42:15.941 [1] DEBUG - Forms designer: Initializing nested service container of locationTextBox [System.Windows.Forms.TextBox], Text: using Reflection
15:42:15.944 [1] DEBUG - Forms designer: Initializing nested service container of quantityTextBox [System.Windows.Forms.TextBox], Text: using Reflection
15:42:15.946 [1] DEBUG - Forms designer: Initializing nested service container of label2 [System.Windows.Forms.Label], Text: using Reflection
15:42:15.954 [1] DEBUG - Forms designer: Initializing nested service container of barcodeTextBox [System.Windows.Forms.TextBox], Text: using Reflection
15:42:15.956 [1] DEBUG - Forms designer: Initializing nested service container of label3 [System.Windows.Forms.Label], Text: using Reflection
15:42:15.971 [1] DEBUG - Forms designer: DesignerLoader loaded, HasSucceeded=True
15:42:15.992 [1] DEBUG - FormsDesigner loaded, setting ActiveDesignSurface to System.ComponentModel.Design.DesignSurface
15:42:16.007 [1] INFO - Form Designer: END INITIALIZE
15:42:16.007 [1] DEBUG - FormsDesigner view content activated, setting ActiveDesignSurface to System.ComponentModel.Design.DesignSurface
15:42:16.008 [1] DEBUG - ActiveContentChanged to ICSharpCode.FormsDesigner.FormsDesignerViewContent
15:42:16.008 [1] DEBUG - IDEContainer: Connecting property grid to service provider
15:42:16.396 [1] DEBUG - TypeResolutionService: AssemblyResolveEventHandler: Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca
15:42:16.416 [1] ERROR - ThreadException caught
--> Exception:
System.TypeInitializationException: The type initializer for 'Symbol.MT2000.UserInterface.QuestionForm' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Symbol.MT2000.Utils.SystemMonitor' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca' or one of its dependencies. The system cannot find the file specified.
File name: 'Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca'
at Symbol.MT2000.Utils.SystemMonitor..cctor()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at Symbol.MT2000.Utils.SystemMonitor.get_BatteryLevel()
at Symbol.MT2000.UserInterface.BaseForm.Reconfigure()
at Symbol.MT2000.UserInterface.InputForm.Configure(InputForm inputForm)
at Symbol.MT2000.UserInterface.InputForm..ctor()
at Symbol.MT2000.UserInterface.InputForm..cctor()
--- End of inner exception stack trace ---
at Symbol.MT2000.UserInterface.QuestionForm.Initialize()
at Symbol.MT2000.UserInterface.BaseForm.initTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
15:42:21.032 [2] FATAL - UnhandledException caught
--> Exception:
System.TypeInitializationException: The type initializer for 'Symbol.MT2000.UserInterface.InputForm' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Symbol.MT2000.Utils.SystemMonitor' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca' or one of its dependencies. The system cannot find the file specified.
File name: 'Symbol.Fusion, Version=1.6.1.6, Culture=neutral, PublicKeyToken=68ec8db391f150ca'
at Symbol.MT2000.Utils.SystemMonitor..cctor()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
--- End of inner exception stack trace ---
at Symbol.MT2000.Utils.SystemMonitor.get_BatteryLevel()
at Symbol.MT2000.UserInterface.BaseForm.Reconfigure()
at Symbol.MT2000.UserInterface.InputForm.Configure(InputForm inputForm)
at Symbol.MT2000.UserInterface.InputForm..ctor()
at Symbol.MT2000.UserInterface.InputForm..cctor()
--- End of inner exception stack trace ---
at Symbol.MT2000.UserInterface.InputForm.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
15:42:21.032 [2] FATAL - Runtime is terminating because of unhandled exception.
---- Post-error application state information:
Installed 3rd party AddIns:
Workbench.ActiveContent: ICSharpCode.FormsDesigner.FormsDesignerViewContent
ProjectService.OpenSolution: [Solution: FileName=C:\Users\Public\Motorola EMDK for .NET\v2.8\Samples VS2005\VB\VB_MT2000_ScanInventory\VB_MT2000_ScanInventory.sln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [VBNetProject: VB_MT2000_ScanInventory]