16

In an earlier question, I've found out that sadly Solution Folders are not real folders inside a directory.

I wonder if there is an AddOn or Macro that adds this functionality? i.e. when I create a Solution Folder, it created a real folder. When I Create a new Item (Right Click => Add => New Item) it automatically moves them into that folder, removing causes it to delete it from disk (after asking) etc.

This is for Visual Studio 2005, although we might upgrade to 2008 in a few months.

Community
  • 1
  • 1
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
  • 1
    I have no answer, but I really would like this feature as well. – ctacke Jan 29 '09 at 14:31
  • This is a good idea, and it certainly seems doable assuming certain facilities in the Visual Studio extension api. You might consider adding an "extension" tag (or similar) to bring in more extension experts to the discussion. I'd like to see this happen. – el2iot2 Jan 30 '09 at 14:31

6 Answers6

4

As of now, this doesn't seem to be possible in either VS 2005, 2008 and 2010 and there is no AddIn for this.

Michael Stum
  • 177,530
  • 117
  • 400
  • 535
2

I too thought it was a strange idea. However it can be a useful tool to logically group projects in solutions without necessarily moving around folders in the file system.

Rad
  • 8,336
  • 4
  • 46
  • 45
  • 1
    It also greatly helps to keep everything that belongs to an application organized: Build Scripts, Documentation and Specs, and everything else that needs to go into the SVN but that does not belong to a specific project in the solution. – Michael Stum Jan 29 '09 at 20:06
  • @Micheal - this is exactly what we use solution folders for as well. – Nathan Jan 30 '09 at 18:24
1

Maybe what you want is to add files to a solution folder as «links», i.e., keeping the files where they are but giving them a different organization inside the solution. (when you add an existing file to a solution folder or to a normal project folder, if it is in a different corresponding physical folder, the file is copied). It usually stays unnoticed, an option in the «Add > Existing Item ...» dialog where you can choose "Add As Link", instead of the "Add". This allows to share files amongst projects, or, simply, organize them differently. What I oftem miss is the possibility to add "virtual" folders inside a project, for organizational purposes, without breaking the namespace/folder best-practice.

1

I suspect you need this for revision control tool. In that case Look at AnkhSVN.

GregC
  • 7,737
  • 2
  • 53
  • 67
0

Can't really get the point you want to add this function.

Sometimes you want to know if it can do this , however, the answer may be no. But it is not necessary means you can't achieve your original goal, there still a few ways to work around it without this.

Additionally, VS solution suppose to be the shortcut of your project settings and should not been included in any hard-code, the solutions may be various between the PCs and IDE envrionment.

Shuoling Liu
  • 491
  • 6
  • 19
  • Solution should contain stuff like Documentation, Libraries, build scripts & batch files and other stuff that's part of the solution but not of any project. – Michael Stum Jan 01 '10 at 23:13
-2

I didn't really use VS2005 much, but have been using VS2008 for the past year.

It has a tick box for creating a solution folder when you create a new solution/project.

If you then use the "Solution Explorer" window you can create and manipulate folders and class files within them. This will actually create new directories that match.

Deletion of files from within the Solution Explorer will also delete the actual files from disk.

ChrisBD
  • 9,104
  • 3
  • 22
  • 35
  • Doesn't do that for me. It works for any folder inside a project, but not for folders inside the solution itself. – Michael Stum May 08 '09 at 14:44
  • Yes you're right. I was only checking that project folders and their respective file tree was created. I misunderstood what you were aiming at initially, but now that I do, I fail to see what benefit you have of using the virtual folders as any build related files are at the project level. If it's purely for documentation at the solution level rather than the project level then you can place it in manually created directories and it will appear in a "virtual" folder when added as an existing item to the solution. – ChrisBD May 11 '09 at 11:25