MSBUILDを構築するために、サブライトテキスト2のビルドシステムを作成する方法を教えてください。

StackOverflow https://stackoverflow.com//questions/9646776

  •  10-12-2019
  •  | 
  •  

質問

サブライトテキスト2を使用して、Visual Studio 2010ソリューションを構築します。

これまで私はこれを持っています:

メニュー項目ツール>ビルドシステム>新しいビルドシステム...

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

このエラーを得ます:

msbuild:エラーMSB1003:プロジェクトファイルまたはソリューションファイルを指定します。the 現在の作業ディレクトリにはプロジェクトまたはソリューションファイルが含まれていません。

ビルドファイルにプロジェクトフォルダディレクトリを指定する方法は疑問に思います。

役に立ちましたか?

解決

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

他のヒント

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.

Here is reference to all features of Sublime's Build System.

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
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top