Visual Studio Solutions Folder as real Folders

There is a workaround, that actually behaves as expected.

  1. Add a New or Existing Web Site to the Solution. (I usually create a new one.)
  2. Just make sure it’s created inside your solution folder. (I sometimes even create a “link” to an external folder, e.g. ‘Docs’ or ‘Marketing’ on a network share. In that case it’s ignored by Git of course.)
  3. Make sure to go to the “Project” settings or Configuration Manager to exclude this “Web Site” from Build and Deploy!

Done. Now Solution Explorer will reflect any change in the file system and vice versa (including subfolders).

I (miss)use it for specs, docs, PM and some DevOps scripts that are shared within the team. It’s easy to choose, what to include in source control or not, and (if set up correctly) it doesn’t conflict with build.

I know the feature is not intended for that use case, but except for the maybe misleading “Project” icon I didn’t find any shortages to that hack yet. And there still are use cases where the classical (virtual) Solution Folders that VS provides, fit in the picture. What do you think?

Leave a Comment