The Visual Studio Hosting Process - VSHost.exe
The hosting process is a feature in Visual Studio 2005 that improves debugging performance, enables partial trust debugging, and enabled design time expression evalution. The hosting process files contain vshost.exe file and is placed in the output folder of the project.
Improved Performance
Running a managed application requires the creation of an AppDomain and associating the debugger with the application. Performing these task can introduce a delay between the time debugging is started and the time the application begins running. The hosting process helps increase performance by creating the application domain and associating the debugger in the background, and saving the application domain and debugger state between runs of the application.
Partial-Trust Debugging and Click-Once Security
With the Visual Studio 2003, it is not possible to test and debug an application which do not require full trust. Visual Studio 2005 introduces the ability to debug applications in partial trust. An application can be specified as a partial trust application in the security page of the Project Designer. Debugging a partial trust application requires special initialization of the application domain. This initialization is handled by the hosting process.
Design-Time Expression Evaluation
Another new feature in Visual Studio 2005 is the abiltiy to test code from the Immediate Window, without actually running the application. You can use the Visual Studio Immediate window to execute a function or subrountine while your application is not running. If the function or subrountine contains a breakpoint, Visual Studion will break execution at the appropriate point and you can examine your program state.
Disabling the hosting process.
To disable the hosting process clear the Enable the Visual Studio hosting process checkbox in the project properties window. Disabling the hosting process disables the partial-trust debugging, Design-time expression evalution and also increases the time needed to begin debugging .net applications.
Note : Hosting process files (.vshost.exe) are for use by Visual Studio 2005 and should not be run directly or deployed with an application.
Cross posting from my .Net Journal blog