AX2009 POS development - peripherals errors


I’m currently trying to set up a debugging enviroment on POS 2009. I have used this enviroment before, but now I have a problem where the POS tries to load all the peripherals when I debug. Is this normal when debugging the perpherals project?

The problem is that I have no peripherals connected, and therefore I get the following error:

System.IO.FileLoadException: Could not load file or assembly ‘Interop.OposScanner, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

File name: ‘Interop.OposScanner, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ —> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

The Zone of the assembly that failed was:


at LSRetailPosis.POS.Program.Application_ThreadException(Object sender, ThreadExceptionEventArgs e)

at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)

at System.Windows.Forms.Control.WndProcException(Exception e)

at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

at DevExpress.Utils.Win.Hook.ControlWndHook.CallWindowProc(IntPtr pPrevProc, IntPtr hWnd, Int32 message, IntPtr wParam, IntPtr lParam)

at DevExpress.Utils.Win.Hook.ControlWndHook.WindowProc(IntPtr hWnd, Int32 message, IntPtr wParam, IntPtr lParam)

at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)

at System.Windows.Forms.Control.SetVisibleCore(Boolean value)

at System.Windows.Forms.Form.SetVisibleCore(Boolean value)

at System.Windows.Forms.Control.set_Visible(Boolean value)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.Run(Form mainForm)

at LSRetailPosis.POS.Program.Main(String[] args)

If I start POS directly withot the Peripherals project, it works great.


The error doesn’t seem to be related to any error related to debugging being enabled. The error message is informing that you have an assembly with an invalid signature. You appear that you have a corrupt assembly.

But how come it works perfectly if I start POS normaly, but as soon as I start it through Visual Studio I get this error? If I am not mistaken they use the same assembly… If not, how can I find out which assembly that isnt working?