What is the * .vshost.exe.config file?

When I compile the application with VS2008, I sometimes get 2 identical configuration files:

  • *. Exe.config
  • *. Vshost.exe.config

What is the last one for?

+47
visual-studio-2008 config
Nov 12 '08 at 18:41
source share
4 answers

Here is a blog post that talks about the vshost process and its purpose.

http://blogs.msdn.com/dtemp/archive/2004/08/17/215764.aspx

+26
Nov 12 '08 at 19:18
source share

When debugging inside VS, your application will be called [appname] .vshost.exe, so the .vshost.exe.config file is where the .net runtime will look for the program configuration.

+17
Nov 12 '08 at 18:45
source share

I noticed something else about this.

While VS creates a configuration called [appname] .vshost.exe.config, the API call:

var s = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile 

does not return this name, but returns: [appname] .config

It used VS2010. Not verified in VS2008

+2
Aug 31 2018-11-11T00:
source share

This sole purpose of this file is to help debug and host Process.Visual Studio improves debugger performance. It includes new debugger features such as partial trust debugging and evaluation of expressions at design time.

If you turn off the hosting process, partial trust debugging will not work, even if partial trust protection is enabled on the Security page in the Project Properties window.

You can disable this in the Project menu → click on “Properties” → the Debug tab → uncheck the box “Enable the placement process in Visual Studio”. A development-time expression always uses a hosting process. Disabling the placement process in the project properties disables the evaluation of expressions at design time for class library projects.

For other types of projects, expression evaluation during development is not disabled. Instead, Visual Studio runs the actual executable and uses it for evaluation during development without the hosting process.

+1
Oct 25 '18 at 14:22
source share



All Articles