Simple Cerberus project stuck on "The debugging target runtime is loading the application assemblies and starting execution"

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:
Found debugger!
Create TS.
Assembly: System ( Loading Deployment Assemblies.
Assembly: Microsoft.SPOT.Hardware.PWM ( Attaching deployed file.
Assembly: System.IO ( Attaching deployed file.
Assembly: Microsoft.SPOT.Hardware ( Attaching deployed file.
Assembly: mscorlib ( Attaching deployed file.
Assembly: VanillaCerbGadgeteerApp ( 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.

  1. Restart the FEZ Cerberus
  2. Restart the PC
  3. 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.”
  4. Swapping between the PC’s USB and a powered USB hub
  5. Uninstalling the WinUSB drivers and instead installing the legacy drivers
  6. Setting a breakpoint (it never gets there)
  7. 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 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.


I’ve had times where my Cerb gets stuck in some weird state. Either it don’t show up in the device manager, VS.NET will not talk to it, or I get “Hardware error” when I try to deploy…

Loading the bootloader, firmware and .net stuff all over again [em]a couple of times[/em] usually fixes the problem.

I’m developing on Win7 32bit, with Parallels on Mac/OSX Maverics. But I have an old WinXP machine to reset the Cerb when i starts fighting me.

Thanks danibjor. When you say “.net stuff” do you mean repeated reinstalls on the PC or just the bootloader and firmware on the mainboard?

@ 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.

(developing on Windows 8.1)

Thanks alexpodlesny, but as you can see from my list I have restarted VS (and the whole PC) and this is a new project and there are no modules attached.

try it on emulator when you get stuck and see if that works…

Thanks all. I’ve now also tried

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.

even when using emulator? or only when you switch back to the board.

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.

so when ran under emulator you do get to Program Started ? even after all the errors…

attached is screenshot of my test that works…
I would verify the references and make sure they are correct… remove any and all extra ones you don’t need… refer to my snapshot for comparasion…


and the debug view, notice the assembly versions and compare with yours…

Jay Jay, mine looks very like your first screenshot (see attached)

andre.m, yes. I mentioned in the posted question that I have tried this with a powered hub and the same problem arises.

can you please post a screenshot of your deployment to the cerb board…


Here you go Jay Jay, one for the emulator and one for the FEZ Cerberus

I see I get that from time to time and all I have to do is hit the reset button at that point and VS continues as usual, please try that…


Yeah Jay Jay, I use that trick too. For this it has no effect whatsoever, VS stays stuck at exactly the same point.

By way of additional diagnostics I did make a new project for the Spider mainboard and that works fine. It is just the FEZ Cerberus that is sticking.

it could be the board…

let me ship you a cerbuino…

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.

I’ve made two changes and it appears to have fixed my problem (I’ll check again tomorrow just-in-case it’s a short lived fix like the laptop rebuild was). The two things I did:

I installed Visual Studio 2013 (though I am still actually using 2012)
I swapped my hard drive into another Dell 6320[/ol]

My guess is that it was a hardware fault (perhaps in the USB?) on the other laptop.