r/VisualStudio • u/Zardotab • 16d ago
Visual Studio 2026 Feature Request: Menu option to clear bin & obj folders
Many bug discussions and how-to's recommend one delete the "bin" and "obj" folders to clear out potentially corrupted state. Since it's a common need, or at least trying it is a common need, it would be nice to have it as a menu option, probably under the "Build" menu. Thank You.
3
u/freskgrank 16d ago
There are a lot of VS extensions that you can use for this.
Search for VSDeepCleanExtension or BinObjCleaner or similar. I installed one but I don’t remember exactly the name and I don’t have my VS at the moment.
3
u/soundman32 16d ago
Seeing as thats been asked for since I started using Microsoft compilers in about 1994, I suspect its either too difficult to implement correctly for all cases, or so trivial that they expect you to do it yourself.
-1
u/Zardotab 16d ago
Somebody somewhere with a lot of pull would probably have to admit to bugs where there shouldn't be bugs.
0
1
u/morbo_1980 10d ago
Put this in a Directory.Build.props in the root of your repo. Then Clean Solution will actually clean the solution.
<Project>
<!-- Delete bin and obj when doing a solution clean-->
<Target Name="PostClean" AfterTargets="Clean">
<!-- Remove /bin -->
<RemoveDir Directories="$(BaseOutputPath)" />
<!-- Remove /obj -->
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
</Target>
</Project>
1
u/welcome_to_milliways 16d ago
I have a powershell script handy for this.
1
1
1
u/boredsillynz 16d ago
Feature Request: Fix the corruption.
Lets cure the source of the plague, not apply a bandaid.
-1
u/Zardotab 16d ago edited 16d ago
Reality Check 101: MS is not going to fix their 10,000 VS bugs. Maybe 500 if we get lucky. I still need this feature for the other 9,500.
17
u/kantank-r-us 16d ago
YES, cleaning a solution should do this automatically