pedropombeiro / ReSharper.AutoFormatOnSave

An addin for Visual Studio which causes the documents to be reformated on save
http://blog.pedropombeiro.com/keeping-code-formatted-the-easy-way/
MIT License
27 stars 20 forks source link

Build starts before files are saved properly #25

Open NameOfTheDragon opened 7 years ago

NameOfTheDragon commented 7 years ago

There seems to be a bit of an interaction with VS build, when files are implicitly saved by clicking the Build button or pressing F6.

This of course saves all the files, but the files seem to be saved before the format-on-save extension runs, so the build kicks off, then the extension runs and changes the files while the build is in progress, which means the build is instantly considered obsolete. This leads to a lot of unnecessary build steps being run and the wasted time and resources sort of negates the benefit of format-on-save.

This is particularly noticeable when ReSharper build is being used, which is otherwise very good at not rebuilding things unnecessarily.

I'm using VS2017, but I think the problem also existed in 2015 (not 100% certain though)

Jogge commented 7 years ago

Seems to be related to #24.