Click here to Skip to main content
15,867,999 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When we open a project/solution in Visual studio, the project's vshost.exe file will be executed and launched in memory automatically (I think this is done by Visual studio) and this process (vshost.exe) will be in running state till we close the solution from VS.

I know that this process has been introduced from VS2005 onwards to aid the debugging performance.
Our application will be launched from this process when we run through F5 but if we run through ctrl+F5 then our app runs isolated (without vshost.exe). But still vshost.exe will be parellely running along side of our project exe. Eventhough this time not required in real sense. Hence we are loosing some memory (thousand KBs) unnecessary.

Finally, my question is, is there anyway/setting in VS to halt running of vshost.exe until F5 is pressed. Because why I'm asking this is: let's say that I opened a solution in VS and I just want to run without debugging, then obviously I will hit ctrl+F5. Then, in this case I dont need vshost.exe to be running in background.

I hope question was clear but if you get any queries or confusion please let me know.

Thanks...
Posted
Updated 7-Nov-17 0:25am
Comments
tumbledDown2earth 11-Jun-13 4:30am    
vshost gets killed when you close visual studio. Otherwise it does not interfere with any non-debugging process and remains idle
Mohammed Hameed 11-Jun-13 4:47am    
Yes, that's true. It remains idle but it consumes some memory, right? So, if I run without any debugger (thru ctrl+F5) then why we should hold unnecessary that piece of memory (some thousand KBs - around 3k KB in my case) for Vshost.

1 solution

You can turn it off. Go to your project settings and uncheck the 'Enable the Visual Studio hosting service' on the debug tab.
 
Share this answer
 
Comments
Mohammed Hameed 11-Jun-13 5:15am    
Superb Rob, superb solution. Thanks a lot. Its a great option Microsoft has given to Developers. Unfortunately I was not aware of it :). Anyhow a + in my skills and hence a 5+ in your solution :).

See now one fact came into my notice is: there are infact 3 processes attached for this debugging aid purpose, they are conhost.exe - consumes 736 Kb, Intellitrace.exe - consumes 25568 Kb, vshost.exe - consumes 3828 kb. Therefore I could save a total of 30132 Kb memory in my case.
Note: Please note that these stats is according to my Project, obviously they may differ application to application.

Thanks again....
Rob Philpott 11-Jun-13 5:23am    
No problem!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900