Solved

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

Posted on 2015-01-29
5
447 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
[X]
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
5 Comments
 
LVL 11

Accepted Solution

by:
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.
0
 
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.
0
 
LVL 11

Expert Comment

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

Author Closing Comment

by:LeighWardle
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!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 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