Skip to content
An addin for Visual Studio which causes the documents to be reformated on save
C#
Latest commit 2e50bdd May 13, 2016 @PombeirP Update version to 1.2.4.0
Failed to load latest commit information.
Properties
Resources
packages
.gitattributes
.gitignore
.mailmap
CodeStyle.DotSettings
GeneralCode.DotSettings
GlobalSuppressions.cs
GuidList.cs
LICENSE.md
NativeMethods.cs
README.md
ReSharper.AutoFormatOnSave.csproj
ReSharper.AutoFormatOnSave.sln
ReSharper.AutoFormatOnSave.sln.DotSettings
ReSharper.AutoFormatOnSavePackage.cs
Resources.Designer.cs
Resources.resx
Settings.StyleCop
VSPackage.resx
packages.config Use NuGet packages for compatibility since VS2010-2015. Jan 9, 2015
source.extension.vsixmanifest

README.md

ReSharper.AutoFormatOnSave

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, 2012 and 2013 as well as any version of ReSharper.

Something went wrong with that request. Please try again.