Custom assembly deployed from a VS project. As per my initial note, it is probably the issue cited in the troubleshooting info as follows:
Unable to Deploy from VS due to application code
If a deployed application contains a very tight infinite loop with no way for other threads/code to execute, it can be come difficult (if not impossible) for Visual Studio to attach to the TinyCLR interfaces necessary to re-deploy the app. The same problem can occur in devices that support PowerState.Sleep() (GHI.GameO.Power.TurnOff()) where it is invoked very early in the program.
Resetting the device doesn’t help as the minute it regains power it re-executes the currently deployed program. The first attempt you should make is to use MFDeploy and try to erase the application. If that fails you may have to reboot into tinybooter (see instructions in firmware update links: Firmware (TinyCLR) Update) and reload firmware (TinyCLR). During development, if you have a section of code that can potentially tie up the processor like this, you might want to surround the code with a safety net of some sort (wait for a button press, for instance) so that you can avoid the infinite code on power-up.
I have tried reloading firmware as described above, but it seems to have no effect.