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

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

Posted on 2015-01-29
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
  • 2
  • 2
LVL 11

Accepted Solution

LordWabbit earned 250 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 250 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating a route in asp.net webforms 2 32
Disable extension 8 48
Store results in vb.net 3 24
Get month and date in a format 4 31
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

840 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