Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2015-01-29
Medium Priority
Last Modified: 2015-02-01
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.

Question by:LeighWardle
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 11

Accepted Solution

LordWabbit earned 1000 total points
ID: 40578768
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.
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 1000 total points
ID: 40582150
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.
LVL 11

Expert Comment

ID: 40582234
This is because the default setup for VB is for amateurs
That is so condescending of MS.
LVL 40
ID: 40582591
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.

Author Closing Comment

ID: 40583154
Thanks, LordWabbit and Jacques Bourgeois (James Burger) for setting me straight.
Special thanks to Jacques Bourgeois (James Burger) for his excellent explanations, as usual!

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question