Xamarin Studio has been replaced for Visual Studio on MacOS. I have a project that builds a DLL using Xamarin iOS. For DevOps (automated release), I want to build the project for release from the command line. I know previously the mdtool was used for this purpose, as seen in this answer but now in visual studio there is no more mdtools binary anymore.
Asked
Active
Viewed 658 times
1 Answers
2
msbuild
has replaced mdtool
(and xbuild
), so all the tasks that once were handled by mdtool
are now handled by the cross-platform msbuild
and its standard set of cmd-line options.
Release configuration:
Clean a single project in a solution
msbuild /p:SolutionDir=./ /target:Clean /p:Configuration=Release SomeProjectLibrary/SomeProjectLibrary.csproj
Build a single project in a solution
msbuild /p:SolutionDir=./ /target:Build /p:Configuration=Release SomeProjectLibrary/SomeProjectLibrary.csproj
Note: Using Using SolutionDir=./
so these cmds are being run from the root directory of the solution.

SushiHangover
- 73,120
- 10
- 106
- 165
-
As an additional info, in my quest for automation, I also found the executable `/Applications/Visual\ Studio.app/Contents/MacOS/vstool`, I also managed to build with `vstool -v build --target:project_target --configuration:Release project.sln` – Felipe Cesar Assis May 30 '18 at 20:23
-
2@FelipeCesarAssis In terms of CI, using the Visual Studio Tool Runner (`vstool`) requires that the VS4M is installed, which is not a normal thing to install on macOS CI servers, but yes, it is available and basically it is calling msbuild tasks to perform its work. – SushiHangover May 30 '18 at 20:32