Skip to content
An addin for Visual Studio which causes the documents to be reformated on save
Branch: master
Clone or download
Latest commit 4e3bd50 Feb 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Properties Add support for VS 2019+ Feb 23, 2019
Resources Initial commit. Oct 9, 2012
packages Use NuGet packages for compatibility since VS2010-2015. Jan 9, 2015
.gitattributes Initial commit. Oct 9, 2012
GeneralCode.DotSettings Implement check for valid file extension before running cleanup. Oct 10, 2012
GlobalSuppressions.cs Initial commit. Oct 9, 2012
GuidList.cs Initial commit. Oct 9, 2012 Add MIT license. Dec 6, 2012
ReSharper.AutoFormatOnSave.sln Initial commit. Oct 9, 2012
ReSharper.AutoFormatOnSavePackage.cs Resharper 2016.1 compatibility May 13, 2016
Settings.StyleCop Initial commit. Oct 9, 2012


Keeping code formatted the easy way

If you’re like me, you prefer to have your code tidy, and being a lazy guy, you have defined a ReSharper Code Cleanup template. The problem however, is that you might forget to run the Code Cleanup command every time you change the file. So I decided to go ahead and automate that by building a Visual Studio extension which will run the Silent Code Cleanup command every time a file in a solution is saved.

Installing ReSharper.AutoFormatOnSave via Visual Studio Extension Manager

The profile to use is defined in the box signaled below (ReSharper 6.1 shown here):

Choosing a default code format profile in ReSharper

The addin should be compatible with Visual Studio 2010 or later as well as any version of ReSharper.

You can’t perform that action at this time.