编译和构建过程 [英] Compilation and Build Process

查看:83
本文介绍了编译和构建过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中编译C#应用程序后,在项目的bin\debug \目录中,构建了5个b b文件。其中有2个.exe文件。带有这些名称的
:app.exe和app.vshost.exe。

我是否可以将exe文件app.exe复制并粘贴到另一台计算机上运行我的应用程序吗?

或其他文件也必须可用?

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?

推荐答案

VS2005引入了vshost.exe功能(回答你的问题)通常你不需要把它复制到另一台电脑上。



它的目的主要是让调试启动更快 - 基本上就是已经是框架运行的过程,只需准备好在你想要的时候加载你的应用程序。



参见这篇MSDN文章(调试和托管流程 [ ^ ])和这篇博文(http://blogs.msdn.com/b/dtemp/archive/2004/08/17/215764.aspx [ ^ ])了解更多信息。
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.


是的,app.exe足以在不同的机器上运行。 (除非你需要一些DLL,否则这些也是必需的。)

app.pdb是调试数据库,它需要有效地调试应用程序,但不能运行它。

app.vshost.exe仅用于在VisualStudio中运行应用程序,vshost代表VisualStudio主机
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"


您只需使用代码在任何计算机上(安装了所需的.NET Framework版本),您只需要在输出目录中,您可以通过项目属性控制该目录(请参阅构建选项卡)。但是,如果提供了调试信息,则某些文件是冗余的以供使用。我建议使用默认的Release配置来查看输出有什么。



实际上,您应该完全了解文件的位置,分为三类:1)源代码(不是解决方案和项目目录中的所有内容都是源代码;排除* .user,* .ncb,* .sou等),2)输出,3)临时文件 - 其他一切。你需要知道所有这些东西的位置或文件类型才能真正发展。



-SA
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

这篇关于编译和构建过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆