The MakefileBuild
Visual Studio Extension adds functionality to Visual Studio to open and build Makefiles. The extension provides a command that can be triggered to build the active Makefile in the editor, using make.exe
found in the system PATH.
- Open Makefiles: Recognize Makefiles in the Visual Studio environment.
- Build Makefiles: Execute the
make
command to build the Makefile. - Output Window Integration: Displays build output and errors in the Visual Studio Output window.
To use this extension, you need to have the GNU build tools installed on your system. Ensure make.exe
is available in your system PATH.
To install the extension:
- Clone this repository.
- Open the solution in Visual Studio.
- Build the solution to produce the
.vsix
file. - Run the
.vsix
file to install the extension into Visual Studio.
- Open a Makefile in Visual Studio.
- Ensure
make.exe
is available in your system PATH. - Trigger the
MakeCommand
from the command palette.
The core functionality is implemented in the MakeCommand
class:
- Initialization: The
InitializeAsync
method sets up the command and output window. - Execute Command: The
Execute
method retrieves the active Makefile, identifiesmake.exe
in the system PATH, and runs themake
command. - Output Handling: Standard output and error from the
make
command are captured and displayed in the Visual Studio Output window.