Visual Studio中的工作目录与输出路径 [英] Working directory vs output path in visual studio
问题描述
在Visual Studio中,工作目录与输出路径有什么区别?
What is the difference of the working directory vs the output path in visual studio?
将两个设置都设置为同一个目录(如".... \ bin \"
Is it bad to set both setting to the same directory like '....\bin\'
推荐答案
默认情况下它们是相同的.假设您正在调试某些应用程序,它将是bin \ debug.
By default they are the same. Assuming you're debugging some application it will be bin\debug.
输出目录是输出文件所在的位置.默认情况下,Visual Studio会在解决方案内自己的文件夹中构建解决方案中的每个项目.您可以更改项目的构建输出路径,以强制将所有输出放置在同一文件夹中
Output Directory is where your output files goes. By default, Visual Studio builds each project in a solution in its own folder inside the solution. You can change the build output paths of your projects to force all outputs to be placed in the same folder
工作目录是指定要调试程序的工作目录的位置.这是程序在其中查找文件的默认位置.通常,工作目录是默认情况下从\ bin \ debug启动应用程序的目录.
Working Directory is the location which Specifies the working directory of the program being debugged. It is the default place in which a program is looking up it's files. Normally the working directory is the directory the application is launched from \bin\debug by default.
因此每个打开的文件都会相对于工作文件夹打开.如果您在c:\ myapp中安装了一个应用程序,并且所有lib文件都位于同一目录中,那么您将工作目录设置为myapp文件夹,您可以从项目属性中进行操作.
So every opened file will be opened relative to the working folder.Let's say if you have an application installed in c:\myapp with all lib files in the same directory then you will set your working directory to myapp folder and you can do so from project properties.
这篇关于Visual Studio中的工作目录与输出路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!