Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a build system for Sublime Text 2 to build msbuild?

I would like to use Sublime Text 2 to build my Visual Studio 2010 solutions.

So far I have this:

Menu item Tools > Build System > New Build System...

{     "cmd": ["c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe"] } 

I get this error:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

I'm wondering how I specify a project folder directory in the build file.

like image 902
David Silva Smith Avatar asked Mar 10 '12 13:03

David Silva Smith


People also ask

How do I create a new Build System in Sublime Text?

Sublime Text is able to run build programs such as 'make', either when a key in pressed (F7 by default), or when a file is saved. The build system to use can be select from the Tools/Build System menu. If a project is open, the selected build system will be remembered for the project.

How do I run a Makefile in Sublime Text?

Ctrl+M to run Makefile with Sublime+Linux.

Where are sublime build systems stored?

Sublime populates its Tools/Build System menu based on the “. sublime-build” files stored in the Sublime “Packages” directory. Should one need to locate this, it can be found in “~/Library/Application Support/Sublime Text 2/Packages/User” (if using OS X) or the corresponding Packages/User directory on other platforms.


1 Answers

I got it to work by modifying the build system file C:\Users\dave\AppData\Roaming\Sublime Text 2\Packages\User\msbuild.sublime-build like this:

{     "cmd": ["c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe"],     "working_dir": "${project_path:${folder:${file_path}}}" } 

I looked at an existing build configuration that shipped with Sublime to figure it out:

C:\Users\myUser\AppData\Roaming\Sublime Text 2\Packages\Makefile\Make.sublime-build

like image 191
David Silva Smith Avatar answered Sep 20 '22 19:09

David Silva Smith