Warning: This no longer works as of Bootstrap version 3.1!
Install the Bootstrap Less Source package to your web project.
Close any running instances of Visual Studio.
Install the RECESS npm package globally via the node.js command prompt:
$ npm install recess -g
Start Visual Studio.
Re-open your web project, open the Project properties, go to Build Events, and enter in the following into the "Pre-build event command line:"
recess "$(ProjectDir)Content\bootstrap\bootstrap.less" --compress > "$(ProjectDir)Content\bootstrap-compiled.css"
Note: The double quotes around the files was required for the command to succeed.
Build your project, and check to see if the
bootstrap-compiled.css file was created properly.
Make sure you include the
bootstrap-compiled.css file into your project, and set its Build Action to Content.
Set the Build Action on the bootstrap less files to None.
Edit: I've updated the steps to include opening and closing Visual Studio. This is done to make sure that Visual Studio will see the updated
%PATH% environment variable from the node.js installation.