I’m having trouble with a .Net MF 4.2 project running on the FEZ Cerberus. In order to debug the problem I have swapped to a very simple .Net Gadgeteer project. In Visual Studio 2012 I make a new .Net Gadgeteer project targeting the .Net MF 4.2, add the FEZ Cerberus mainboard, and run the project. What I expect to see in the output window is a bunch of diagnostic messages followed by “Program Started” since the boiler-plate Program.cs file’s ProgramStarted method contains just one line of code: Debug.Print("Program Started");
But that is not what I see.
Instead I get this output:
Assembly: System (188.8.131.52) Loading Deployment Assemblies.
Assembly: Microsoft.SPOT.Hardware.PWM (184.108.40.206) Attaching deployed file.
Assembly: System.IO (220.127.116.11) Attaching deployed file.
Assembly: Microsoft.SPOT.Hardware (18.104.22.168) Attaching deployed file.
Assembly: mscorlib (22.214.171.124) Attaching deployed file.
Assembly: VanillaCerbGadgeteerApp (126.96.36.199) Attaching deployed file.
The debugging target runtime is loading the application assemblies and starting execution.
And that’s where it sticks forever. Here are the things I have tried to fix it.
Restart the FEZ Cerberus
Restart the PC
Pausing debugging and then resuming. The pause fails with the error “Unable to break execution. The debugger is still attaching to the process or the process is not currently executing the type of code selected for debugging.”
Swapping between the PC’s USB and a powered USB hub
Uninstalling the WinUSB drivers and instead installing the legacy drivers
Setting a breakpoint (it never gets there)
Switching to a different FEZ Cerberus mainboard
8 ) Running the SDTFUTester to erase the memory on the FEZ Cerberus, reinstall the DFU Tinybooter_4_2_6_1.dfu, and then using the FEZConfig tool to update the firmware to 188.8.131.52 on the mainboard.
None of these steps work. I am still stuck forever on the line The debugging target runtime is loading the application assemblies and starting execution. What should I do to debug this and to fix it?
(N.B. One thing that did fix this was to rebuild my laptop, i.e. to wipe the disk and install the OS etc. from scratch. However this fix was not permanent, I was soon back, stuck at the same point.)
I am running Visual Studio 2012 and have the NETMF SDK 4.3 (RTM) and the NETMF and Gadgeteer Package 2013 R3 installed. I’m currently on Windows 8.1 though I experienced the same (or at least similar) problem when the laptop was on Windows 8.
@ dumbledad - On my end, there has never been a problem with the computer - other than working trough virtualization might kick the Cerb into a useless state every now and then.
Most of the time, just connecting it to the XP machine and deploying a simple Hello World app fixes it - but if now, reinstalling every bits and bytes of software on the device one or a few times use to fix it. It has newer been a problem with software (VS.NET/.NET framework/SDK/etc) on the computer.
I had the same issue on Raptor a couple of times. What solves it for me:
clean up and rebuild solution first, if no help then
closing all open Visual studios and starting completely new GadgeeterApp solution solves the problem. The trick is to take it easy: first get you bare minimum “Hello world” running, then add other code and references to other project one by one.
If still does not work - start unplugging unused modules one by one until hello world works.
Loading the bootloader, firmware and .net stuff all over again a couple of times
Clean up and rebuild solution
Closing all open Visual studios and starting completely new GadgeeterApp solution
Swap to emulator and back again
None of these help. It still hangs at the same point.
Jay Jay, it doesn’t run properly under the emulator, but should it? I’ve never tried to use any of the .Net MF emulators for Gadgeteer projects. I thought you meant that the switch to the emulator and then back again might fix it.
In the emulator deployment gets past the line it was stuck on but the boiler-plate FEZ Cerberus .Net Gadgeteer project throws a series of System.NotSupportedException in GHI.OSHW.Hardware.dll.
Then when I switch back to deploy onto the FEZ Cerberus mainboard itself it hangs as it did before, in the same place.
Thanks Jay, but we’ve got them too, it has to be the Cerberus since the (eventual) goal is to write .Net MF code (with some of the .Net Gadgeteer classes pulled into the project) targeting a device with the same chip. But before I get to that I need to get this simple .Net Gadgeteer code running on a Cerberus. I’ve tried four different FEZ Cerberus mainboards, VS hangs identically on each one.