Solved

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

Posted on 2015-01-29
5
419 Views
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.

Regards,
Leigh
0
Comment
Question by:LeighWardle
  • 2
  • 2
5 Comments
 
LVL 11

Accepted Solution

by:
LordWabbit earned 250 total points
Comment Utility
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.
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 250 total points
Comment Utility
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.
0
 
LVL 11

Expert Comment

by:LordWabbit
Comment Utility
This is because the default setup for VB is for amateurs
That is so condescending of MS.
0
 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
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.
0
 
LVL 1

Author Closing Comment

by:LeighWardle
Comment Utility
Thanks, LordWabbit and Jacques Bourgeois (James Burger) for setting me straight.
Special thanks to Jacques Bourgeois (James Burger) for his excellent explanations, as usual!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now