• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

VB.NET project in Visual Studio 2013 - using Properties | Compile | Configuration=Release, but .exe is Debug Build

Hi Experts,

I am trying to generate a "Release Configuration" version of my project.

I have set Properties | Compile | Configuration=Release. (Properties | Application | Configuration is N/A).
The Properties | Compile screen shows "build output path" is bin\Release.

But when I Build, Rebuild or run the project, the generated .exe file appears in bin\Debug, not bin\Release.

The output window includes this line:

------ Rebuild All started: Project: Explorer Prototype, Configuration: Debug x86 ------

confirming the .exe is the Debug build, not a Release build.

  • 2
  • 2
2 Solutions
There should be a drop down box on your tool bar next to the start button which says Debug, change it to Release.  Changing the properties just changes the path to which the libraries are copied.
Jacques Bourgeois (James Burger)PresidentCommented:
When you go into Properties | Compile | Configuration=Release, you are not telling the system to compile in Release, you are in the interface to configure the properties for the Release configuration.

As stated by LordWabbit, it's the drop down in the toolbar that determines if the application will compile in Release or Debug mode.

And for your information, by default in VB, the Release and Debug configurations generate almost the same thing. The only difference between them is the destination folder, and a compilation switch that provides a little less information for the debugger in Release than it does in Debug. The .pdb (debugger) file that is generated smaller in release. But it is still a debug version. If you run that on any computer that has Visual Studio or a debugger installed, it will jump into debugging if an error is thrown with no Catch to trap it.

This is because the default setup for VB is for amateurs, and amateurs might not understand why their debugger does not work when they are in Release. If you really want a Release version, without the extra useless tools for the user, you need to click on the Advanced Compile Options in the Compile tab, and set Generate debug info to None.
This is because the default setup for VB is for amateurs
That is so condescending of MS.
Jacques Bourgeois (James Burger)PresidentCommented:
VB has always been considered as an entry level language. Because of its syntax, It is a lot easier to learn than C or Java.

VB6 rules were very relaxed compared to C++ rules. You could write good code in VB6, but had to be disciplined to do so. In C++, you had to be disciplined.

Thus VB.NET comes configured with that idea in mind. Option Strict is Off by default. The Release configuration can be debugged by default. An amateur can start program in it without having to care too much about these "problems" that plague them at the start, such as why do a variable that has a value of 10 (Double) does not want to go in another numeric variable (Byte)? Why do I get that strange message about symbols when I start my application? Why does my breakpoint does not work?

This is very confusing for an amateur, and even for some professionals. This is also confusing for somebody who had a lot of experience in VB6. The basic configuration is thus set to prevent these by default, because they would not understand what is happening. Learning a language is not to hard. Learning the intricacies of an environment as complex as Visual Studio is.

I do still prefer VB to C# because of the easier syntax, friendlier tools, and tons of little details that make my life easier and make me more productive. I use VB whenever I can. But C# does come with defaults and even some obligations (there is no Option Strict, C# always works as if it was on) that helps you write better code, but makes it harder for beginners to start developing in the language without solid grounds in programming.

Lucky that with a few change of the defaults we can bring VB up to par with C#, but it it came that way, programmers who learned programming on the fly would stick to VB6 or switch to simpler languages from other providers.
LeighWardleAuthor Commented:
Thanks, LordWabbit and Jacques Bourgeois (James Burger) for setting me straight.
Special thanks to Jacques Bourgeois (James Burger) for his excellent explanations, as usual!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now