Removing non-essential Files from Visual Basic 2010 Compiled Output

By default the compiled output from Visual Basic 2010 comes with several non-essential files for debugging. If you want to remove them from the output folder, here is the article about it.

Background

Normally the compiled output will have the following files:

Visual Basic Compiled Output

  • A compiled executable (.exe)
  • A database with debug information (.pdb)
  • A debug executable for debugging purpose (.vshost.exe)
  • A configuration file for the debug executable (.vshost.exe.manifest)
  • A documentation file (.xml)

Most of the time you will only need the compiled executable.

Disable Generating .pdb

1. Go to project Properties, Compile tab, and click the Advance Compile Options button.

Compile Tab of Project Property

2. In Advanced Compiler Settings dialog, choose None in Generate debug info.

Advanced Compiler Settings

Disable Generating .vshost.exe and .vshost.exe.manifest

1. Go to project Properties, Debug tab.

2. Uncheck the option Enable the Visual Studio hosting process.

Debug Tab of Project Properties

Disable Generating Documentation File .xml

In some version of the Visual Studio there is an option to disable the generation of documentation file in Compile tab of the project Properties. However I couldn’t find this in my Visual Basic 2010 Express and as a result I got to edit the project file using Notepad.

1. Open the Visual Basic Project file .vbproj using text editor.

2. Remove the XML node with tag DocumentationFile.

Visual Basic Project File

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s