Main Site Documentation

Debug vs release


stupid question alert
On a regular application one can work on a debug build and fine tune it until one make a final release build removing debug markers and (hopefully) the code will run faster.
While testing I can’t see anything in the bin/release folder. Has the release option no affect on NETMF projects?


It’s not a stupid question… I found when I finished my SLI project and run as a release version there was no significant difference…

I have a problem with the speed of touch gestures…it works, but it’s very slow…

I thought the release build would have at least sped that part up…

Cheers Ian


I am getting files in Release bin over hear. Question. Are you changing to “Release” build in the menu bar on VS (i.e. not in the Project page) and rebuilding?

In terms of speed. As code is interpreted on MF (not jitted as normal .Net), I would not expect much speed up - except for the savings of noop calls.


Release builds by default set the optimise flag for the compiler. In my experience the compiler can get another 10-15% performance out of the app [italic]if it’s well written[/italic] The compiler can only do so much optimisation, it’s not magic.

The best speed optimisation you can do is to know how net MF works, what costs the most and how you can speed things up with simple changes to code.


My experience with .NET full framework is :

  • difference between debug and release is 0 to 10% (small)
  • difference between launching program with debugger attached or detached is near 100% (huge)

My experience with .NET compact framework is : same. You get much more performance by launching the program without the debugger rather than compiling in release.

My experience with .NET micro framework is… Nothing! I would guess it is the same… I’ll make the test as soon as I receive my Domino!!


99% of any release perf is done by the Jit. As no Jit in MF, not sure it matters. Don’t know if the MetaDataProcessor does anything special in release or not. I think the only thing the code compiler does is remove pre-processor directives if any. Any Conditionals stay in either build, but noop at run time. It would be interesting to see some white paper on this.


I do not think I have seen noticeable difference between debug/release but the system runs much faster if the debugger (VS2010) is not attached.


Is the release/debug choice present in the Express version ?

I guess not because I dont have it, but I just want to check…


Found it in some other forum. In Express edition do the following to see that option.

Enable Tools -> Settings -> Expert Settings.

Go to Tools -> Options. In the dialog box, check the Show All Settings option in the bottom left.

In the above dialog, now choose Projects and Solutions -> General. Check the option Show advanced build configurations. Click Okay.

You should be able to see the Release/Debug options in the toolbar now.