I have an EMX module to work with where the Visual Studio 2010 debugger seemingly deploys the program, but then doesn’t attach. This happens to me periodically where the fix is to redeploy the GHI Libraries (CLR, CLR2, Config). What causes the module to get into this state in the first place?
The properties of the project are set for .NET MF 4.1 (same as libraries I’m using), Startup object is correct, I click the green triangle (F5 - Start Debugging), and Studio reports status on the bottom line:
Preparing to deploy assemblies to device
The debugging target is not in an initialized state; rebooting
The debugging target initialized successfully
but the debugger is immediately detached from the process and the program on the EMX module doesn’t appear to be running.
Why does this happen?
I’ve tried cleaning and rebuilding my EMX project, double checking I’m using the same runtime version of the GHI EMX libraries, exiting and restarting Studio, cycling power to my target, but I keep getting the same behavior.
I can ping the module via MFDeply while it is in this state where it reports OK, USB: EMX_EMX
I can read the device info using MFDeploy while it is in this state:
DeviceInfo: HAL build info: 4.1.2821.0, Microsoft Copyright (C) Microsoft Corporation. All rig OEM Product codes (vendor, model, SKU): 255, 0, 65535 Serial Numbers (module, system): FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Solution Build Info: 184.108.40.206, GHI Electronics, LLC AppDomains: default, id=1 Assemblies: mscorlib,4.1.2821.0 Microsoft.SPOT.Native,4.1.2821.0 Microsoft.SPOT.IO,4.1.2821.0 Microsoft.SPOT.Net,4.1.2821.0 Microsoft.SPOT.Graphics,4.1.2821.0 Microsoft.SPOT.Hardware,4.1.2821.0 GHIElectronics.NETMF.SystemUpdate,220.127.116.11 Microsoft.SPOT.Hardware.Usb,4.1.2821.0 Microsoft.SPOT.TinyCore,4.1.2821.0 System.Xml,4.1.2821.0
This has been happening routinely and the fix is to redeploy the (same) GHI libraries over again when this state hits.
What is likely causing this and how can I prevent the EMX module from getting into this state?