Jump to content
  • Advertisement
Sign in to follow this  
Sneftel

[.net] Minor Visual Studio annoyance

This topic is 4155 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Visual Studio 2005. I have my source files located in a different directory from my project and solution files. The "Add new item" window defaults to putting new items in the project/solution file directory. Is there any way to get it to default to put items in the source file directory? Not a big problem, but it's a bit of a pain at times if I forget it (and I'm a forgetful sort of guy).

Share this post


Link to post
Share on other sites
Advertisement
I generally use the "Add New Item..." option from the right-click menu of the folder (in the solution explorer) I want the new source file to belong to; for C# projects, at least, the IDE makes the file structure reflect the folder structure in the solution explorer so the file ends up in the right folder.

It doesn't do this for C++ projects, though, and I haven't found a solution yet (other than remembering to type the subdirectory prefix when naming the new C++ source file).

Share this post


Link to post
Share on other sites
I always found that the easiest way to create new source files is to just use windows explorer to create a new empty text file, then rename it to the filename you want, and drag/drop it into the solution explorer... :)

I guess you could do a similar thing by using ALT+O to open a file from the current file's location, then create a new file there.

I don't know of any other way.

Share this post


Link to post
Share on other sites
IIRC, you could give a folder a file name filter like *.cc in VS2003 and every newly created .cc file would go there automatically.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!