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

后端 未结 4 1151
遇见更好的自我
遇见更好的自我 2020-12-23 00:16

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...

相关标签:
4条回答
  • 2020-12-23 00:27

    There is now a full MSBuild package for Sublime Text 2 that includes syntax highlighting and completion in addition to build system integration. You can install it using Package Control or directly from https://github.com/tillig/SublimeMSBuild.

    0 讨论(0)
  • Here is reference to all features of Sublime's Build System.

    0 讨论(0)
  • 2020-12-23 00:41

    The error message is because you did not specify what you wanted to build. See the MSBuild Command Line Reference. At the very least you need to specify a project file:

    MSBuild MySolution.sln
    MSBuild MyProject.csproj
    MSBUild MyMSBuildScript.proj
    
    0 讨论(0)
  • 2020-12-23 00:47

    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

    0 讨论(0)
提交回复
热议问题