在Visual Studio中更改默认的源文件目录 [英] Changing the default Source File Directory in Visual Studio

查看:492
本文介绍了在Visual Studio中更改默认的源文件目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何这都不是一个停工,但我想无论如何我应该问一下,因为这是一个烦人的事情.假设我创建了一个新项目,并开始将源文件放在第一次显示的默认目录以外的目录中.后言,每当我打开项目时,在该会话期间我都必须导航到源目录一次.就像我说的,没什么大不了的(但如果可以解决,那就锦上添花了).几次我都将源文件放在默认目录中,最后将该文件提交到SVN中,如果幸运的话,请遍历所有文件,将其删除,然后再次添加它们.

This is not a work-stopper in any way, but I thought I should ask anyway because it is a little annoying. Let's say I create a new project and start putting source files in a directory other than the default that shows up the first time. Afterwords, whenever I open the project, I have to navigate to the source directory once during that session. Like I said, not a big deal (but if solvable, then it's icing on the cake). Quite a few times I absentmindedly put the source file in the default directory and end up committing that file to the SVN and if I am lucky, going through all the files, removing them, then adding them again.

所以我的问题是,有没有办法在每个项目的基础上指定默认源目录?

So my question is, is there any way to specify the default source directory on a per project basis?

推荐答案

我遇到了同样的麻烦.我喜欢将库的公共接口头文件放在单独的目录中,但最终会出现文件目录错字,因为在保存新文件时我忘了导航到正确的目录.不幸的是,Visual Studio没有提供更改新C ++源文件的默认目录的设置.

I have run into the same nuisance. I like to put the public interface header files for a library in a separate directory, but end up with file directory typos because I forget to navigate to the correct directory when saving a new file. Unfortunately, Visual Studio does not offer a setting to change the default directory for new C++ source files.

这篇关于在Visual Studio中更改默认的源文件目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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