Can`t deploy

Hi all. I’ve an estrange problem. If I try to run my app in my FezCobra, I get this error:

If I try to execute in emulator, this one:

I tried to run an example code and works without problem. I think this could be a configuration issue. Any idea?

Thanks!!

EDIT: I add some info extra.
I’ve a solution with 3 projects inside, only one switched as initial.

Did you select transport USB and Device EMX in the project properties under .Net Micro Framework?

Of course. I tried using my device and emulator.

I’ve chosen it in every project inside my solution.

Do you see “EMX_EMX” on the device list on Visual Studio?

Yes I do: http://img853.imageshack.us/img853/5633/sinttulojo.png

Are firmware and SDK?

Of course. I’m using SDK 4.1 and the same version of firmware.

Personally when I see something like this I always step back and try to test things that I know should work.

Close VS
Open VS
Create new project --> use the Fez Cobra Console Application project template
Change deployment target to USB -> EMX_EMX
Deploy.

If that works and my LED flashes, I know its something to do with the way my other project is configured.

The other think I’d ask to be double checked is that you have the same firmware and SDK versions. Go into MFDeploy and confirm the Device Capabilities lists 4.1.7.0 (which is SDK version 1.0.16 from Sept 28th). Then check the release notes file in the GHI SDK folder in Program Files. I know you said you are using the same versions, but screenshots always put that question to rest…

I had a similar thing a week or so ago.

I think this is a “Can’t Deploy” issue, rather than a “can’t compile” issue, try and do an isolated Rebuild.

Can you add the following just inside Main():


Debug.EnableGCMessages(true);
Debug.GC(true);

Then debug window should show : "Type 21 (STACK_FRAME ): XXX bytes"
if this value is 12MB or there about’s, you’ve chewed your memory.

You then need to use the reset button to clear it, before another deploy will work.
Good Luck