Changing the default Source File Directory in Visual Studio

前端 未结 3 1992
盖世英雄少女心
盖世英雄少女心 2020-12-18 18:18

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

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-18 18:47

    I had the same problem when I started using build systems (CMake, Premake) which requires me to keep my project files separate from my source files, which hampered my workflow.

    Although changing the default source directory seems impossible, if you aren't afraid to spend money, the workaround I found was to use the Visual Assist extension.

    • You can bind a shortcut of your choise to the Create File command which creates a new file relative to the directory or your open file.
    • I'd also recommend to base one's workflow around the wonderful Create from Usage command (which I think greatly boosts productivity) which almost eliminates the need to manually create files.

    The extension is great, albeit a bit costly. I would love to see Microsoft incorporate these features directly in the IDE eventually as they are found vanilla in a lot of other IDEs e.g. Eclipse, Intellij.

    There might be some free extensions available that does the same thing, but I haven't found any.

提交回复
热议问题