Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Mac, build from command line?

I'm considering using Visual Studio and Xamarin to build a cross-platform app but I prefer to use Sublime Text as my editor. Currently I can't find any information on 3rd party tool integration with Visual Studio.

Does Visual Studio have any way to build from the command line like Xcode does using the "xcodebuild" utility? Ideally I want to make a shell script which can build as if I pressed the build button in VS and return errors I can parse and display in Sublime Text.

Any suggestions are greatly appreciated.

like image 911
GenericPtr Avatar asked Jul 20 '26 19:07

GenericPtr


2 Answers

We've use the command line like the following: msbuild /p:Configuration="AppStore" /p:Platform="iPhone" /p:IpaPackageDir=bin/iPhone/AppStore /p:BuildIpa=true /target:xxxxxxx.sln

Finding doco for what options are required has taken time via Google. Hope this helps.

like image 75
Duncan Avatar answered Jul 23 '26 10:07

Duncan


I use 'vstool' located at "/Applications/Visual Studio.app/Contents/MacOS/vstool" this way:

vstool build -t:Build -c:"Release|iPhone" "MyProject.sln";

As mentioned in vstool help:

Visual Studio Build Tool
build [options] [build-file]
-p --project:PROJECT  Name of the project to build.
-t --target:TARGET    Name of the target: Build or Clean.
-c --configuration:CONFIGURATION  Name of the solution configuration to build.
-r --runtime:PREFIX   Prefix of the Mono runtime to build against.

Supported targets:
  Build: build the project (the default target).
  Clean: clean the project.
like image 34
Grigory Aleksanin Avatar answered Jul 23 '26 11:07

Grigory Aleksanin