Working directory vs output path in visual studio

2020-05-01 07:08发布

What is the difference of the working directory vs the output path in visual studio?

Is it bad to set both setting to the same directory like '....\bin\'

1条回答
冷血范
2楼-- · 2020-05-01 07:45

By default they are the same. Assuming you're debugging some application it will be bin\debug.

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

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.

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.

查看更多
登录 后发表回答