Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically Build after save, for Visual Studio 2015?

When using Visual Studio, I'd like it to build my projects continuously. That is, after every save, kick off a build. I tend to work on large (35+ project) solutions, so having everything up-to-date saves me time when it comes to starting the app.

Roslyn gives you compiler errors as you type, but it doesn't actually run the full build process, which means you still need to tell VS to build and wait for it to complete before debugging or running tests.

Redgate's .Net Demon used to do this kind of background compile, and it was really useful, but it's been discontinued because "Visual Studio 2015 will introduce Microsoft's new Roslyn compiler, with improvements which we believe make .NET Demon redundant."

Is there an option or extension to have Visual Studio 2015 automatically start a build after a file is saved or a project is modified in the IDE?

like image 742
Steve Cooper Avatar asked Oct 20 '15 10:10

Steve Cooper


2 Answers

I started developing a new open source extension that is called BuildOnSave and does exactly that: It builds the current solution or startup project when a file is saved.

It's available on the Visual Studio Extension Gallery: https://visualstudiogallery.msdn.microsoft.com/2b31b977-ffc9-4066-83e8-c5596786acd0

May be you can give it a try. I would very much appreciate feedback.

like image 78
Armin Avatar answered Nov 07 '22 14:11

Armin


There is a sample extension for Visual Commander that runs Cppcheck on the saved file. You can replace Cppcheck with DTE.ExecuteCommand("Build.BuildSolution");

like image 22
Sergey Vlasov Avatar answered Nov 07 '22 14:11

Sergey Vlasov