Coder Perfect

What is the vshost.exe file’s purpose?


When I create and compile a “Hello, World!” application in C#, I get three files in the Debug folder apart from the main exe (e.g. HelloWorld.exe)

What is the purpose of these files?

Asked by Milen

Solution #1

Visual Studio 2005 introduced the vshost.exe capability (to answer your comment).

Its main goal is to make debugging launch faster – basically, a process with the framework is already running and ready to load your application as soon as you want it to.

For more details, see this MSDN article and this blog post.

Answered by Jon Skeet

Solution #2

Answered by Daniel Brückner

Solution #3

The vshost.exe file is the Visual Studio executable (Visual Studio host executable). This is the program that connects to Visual Studio and makes debugging easier.

The vshost.exe and.pdb (debug database) files are not used when distributing your application to others.

Answered by Will Eddins

Solution #4

You can also disable the production of vshost files for your Release build setup while keeping it enabled for Debug.



Adapted from MSDN How to: Stop the Hosting Process from Running

When the hosting process is enabled, calls to particular APIs may be affected. In some circumstances, it’s required to turn off the hosting service in order to get the right results.

To turn off the hosting service

The hosting process is disabled, and various debugging options are either missing or operate poorly. See Debugging and the Hosting Process for more details.

Answered by SimplyInk

Solution #5

I’m not sure, but I think it’s a debugging improvement. However, I normally turn it off (see the project’s Debug properties), and I don’t notice any speed or debugging limits as a result.

Answered by Brian Rasmussen

Post is based on