views:

52

answers:

2

Hi everyone,

Every time I build my .NET application with Visual Studio, I got a appname.vchost.exe file along with my appname.exe file. This file doesn't exist when I build with command line commands. So,

  • What is this *.vchost.exe file for?
  • Could someone explain its working mechanism in detail?

Thanks.

+1  A: 

Its a version of the application used by visual studio to allow you to debug your application, if you clean your solution and build in release mode it will not be there.

Cheers

Iain
It is not necessary in order to debug the application. It is an optimization used for debugging plus a few other things.
Brian Rasmussen
@lain: Thanks for your reply. But I clean my solution and the *.vchost.exe still exist, either Debug or Release. And the size of *.exe and *.vchost.exe differs greatly so I don't think the vchost is just another version of my application.
smwikipedia
+2  A: 

I assume you're talking about the VS hosting process. It is used for

  • Improved Debugging Performance
  • Partial Trust Debugging
  • Design-Time Expression Evaluation

You can turn it off in the project settings. If you want to change the project settings template once and for all please see this question.

Brian Rasmussen