¿Cómo hago un sistema de compilación para el texto sublime 2 para construir MSBUILD?

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

  •  10-12-2019
  •  | 
  •  

Pregunta

Me gustaría usar el texto sublime 2 para construir mis soluciones de Visual Studio 2010.

hasta ahora tengo esto:

Herramientas de elementos de menú> Sistema de compilación> Nuevo sistema de compilación ...

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

Obtengo este error:

MSBUILD: ERROR MSB1003: Especifique un archivo de proyecto o solución.La El directorio de trabajo actual no contiene un archivo de proyecto o solución.

Me pregunto cómo especifico un directorio de carpetas de proyectos en el archivo de compilación.

¿Fue útil?

Solución

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

Otros consejos

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top