8

I am trying to clean up my solution folder. So far I have relocated the packages folder, which is generated by Nuget as described here: C# visual studio how to relocate nuget package folder?

I notice there is also a .vs folder, which is generated by the C# compiler (Rosyln) and is described here: .vs folder to source control in visual studio 2015?. Is it possible/advisable to relocate this folder?

w0051977
  • 15,099
  • 32
  • 152
  • 329
  • 1
    `.vs` folder contains Roslyn cache, but **that does not mean it is generated by Roslyn**. Other IDE components, such as IIS Express support, also place their files there. – Lex Li Jun 07 '17 at 01:50

1 Answers1

-6

I do not believe there is any way to relocate the .vs folder, but the better question is why would you need to? Since it is simply a temp file cache specific to only that solution moving it out of the scope of that folder to a different folder effectively does nothing. If there is no advantage, then why move it?

For example: When moving the NuGet folder it allows you to share the locally downloaded package cache with multiple solutions, saving disk space, network resources, and time. This has a clear advantage

If you simply need to remove that folder for cleanup purposes only (for instance to share it with someone) you can delete it at any time without any concern. It will be auto generated again the next time you build your solution, but it is not required if you just want to share your codebase.

Robert Petz
  • 2,718
  • 4
  • 23
  • 52