views:

1009

answers:

6

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.

+2  A: 

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.

Conrad
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
@Micheal - this is exactly what we use solution folders for as well.
Nathan
A: 

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
Doesn't do that for me. It works for any folder inside a project, but not for folders inside the solution itself.
Michael Stum
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
+1  A: 

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

GregC
A: 

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
Michael Stum
+1  A: 

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.

Duarte Cunha Leão
+1  A: 

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