Question

Our projects are typically stored as single projects, and are not part of a larger solution. When I open a project, Visual studio creates a solution (sln) and soution options (suo) file in my folder. I want to stop this automatic sln and suo creation, Does anybody know how to go about doing this?

EDIT: We have several dozen individual projects, and when I do a compare to source control to find the items that need to be added/checked in, these 2 are always crapping up the list for each project.

Was it helpful?

Solution

I usually just un-check "Create directory for solution" so that it puts the SLN file in the same folder, and then I delete them by hand the first time I close the project. VS won't recreate them unless you do something solution-worthy (add a second project, for example).

There's no native way to avoid generating them.

OTHER TIPS

See if you have "Always show solution" checked under Options -> Projects and Solutions -> General. If so, uncheck it.

I believe this is unchecked by default though. I remember turning this on because I wanted solution to be created always.

If you're using subversion, adding the "svn:ignore" property to the folder to ignore *.sln and *.suo seems like a good solution. Other version control systems have similar functionality. Consult the docs for your specific VCS.

As for actually preventing it from happening, I have no clue, but I suspect it's impossible.

Why bother trying to stop this? Just keep each solution to a single project, and then ignore the .sln/.suo files and open your project files as usual.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top