Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
1.80/5 (3 votes)
See more:
After I compile a C# application in Visual Studio,in the bin\debug\ directory of project,
5 files are built.And there are 2 .exe files among them.
with such names: "app.exe" and "app.vshost.exe".
Can I copy and paste ONLY the exe file "app.exe" to another computer for running my application on it?
or the other files must be available too?
Posted
Updated 9-Mar-13 8:29am
v2

The vshost.exe feature was introduced with VS2005 and (to answer your question) normally you don't need to copy it to another computer.

The purpose of it is mostly to make debugging launch quicker - basically there's already a process with the framework running, just ready to load your application as soon as you want it to.

See this MSDN article (Debugging and the Hosting Process[^]) and this blog post (http://blogs.msdn.com/b/dtemp/archive/2004/08/17/215764.aspx[^]) for more information.
 
Share this answer
 
v2
Comments
Andreas Gieriet 9-Mar-13 15:12pm    
My 5!
Andi
Leo Chapiro 9-Mar-13 15:20pm    
Thank you Andi! :)
Yes, the "app.exe" is sufficient to run on a different machine. (Unless you need some DLLs, then these are required as well.)
The "app.pdb" is the debugging database, it is required to debug the app efficiently, but not to run it.
The "app.vshost.exe" is only used to run the app within VisualStudio, vshost stands for "VisualStudio host"
 
Share this answer
 
All you need to using your code on any machine (where required version of .NET Framework is installed), all you need should be in your output directory, which you control by your project properties (see the "Build" tab). But if the debugging information is provided, some files are redundant for the use. I would recommend to use default "Release" configuration to see what do you have on output.

Actually, you should known perfectly where your files are, classified into three classes: 1) source code (not everything in your solution and project directories is source; exclude *.user, *.ncb, *.sou, etc), 2) output, 3) temporary files — everything else. You need to know the locations or file types of all that stuff, to really develop.

—SA
 
Share this answer
 

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