Provides functionality to quickly clean .NET solutions, git repositories, user info, etc.
ByteDev.DotNet.Cleaner is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:
Install-Package ByteDev.DotNet.Cleaner
Further details can be found on the nuget page.
Releases follow semantic versioning.
Full details of the release notes can be viewed on GitHub.
The SolutionCleaner
type can be used to clean various files and directories at the (.NET) solution level.
Example:
var options = new SolutionCleanerOptions
{
DeleteDotSettingsUserFiles = true,
DeleteNCrunchSolutionFiles = true,
DeleteBinDirectories = true,
DeleteObjDirectories = true,
DeleteDotVsDirectories = true,
DeleteNugetPackagesDirectories = true,
Git = new SolutionCleanerGitOptions
{
DeleteGitDirectory = true,
DeleteGitAttributesFile = true,
DeleteGitIgnoreFile = true
}
};
var cleaner = new DotNetSolutionCleaner(options);
cleaner.Clean(@"C:\MyDotNetApp");
The UserCleaner
type can be used to clean various files and directories at the user level.
var options = new UserCleanerOptions
{
DeleteNugetHttpCache = true,
DeleteNugetPluginsCache = true
};
var clean = new UserCleaner(options);
cleaner.Clean();