Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Building

jdhardy edited this page Apr 29, 2012 · 45 revisions
Visual Studio
Command line
.NET Tips
Mono
Mono Tips

Building from Visual Studio 2010

  1. Start Visual Studio 2010.
  2. Open
    • c:\path\to\Solutions\Ruby.sln solution file if you want to build/work on IronRuby,
    • c:\path\to\Solutions\IronPython.sln solution file if you want to build/work on IronPython, or
    • c:\path\to\Solutions\IronStudio.sln if you want to build IronRuby and IronPython Tools for Visual Studio.
  3. Press “F6” to build the solution.
    If you want to launch a Visual Studio instance that loads IronRuby or IronPython Tools that you’ve just built follow these steps:
  4. Select IronRubyTools or IronPythonTools project as a “startup project” (doesn’t matter which one, either of them launches VS with both languages enabled).
  5. Open Properties page of the selected project (Alt+Enter or from context menu).
  6. In Debug tab select “Start external program” as the Start Action and enter the path to devenv.exe, something like C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.
  7. Type /rootsuffix Exp to the Command line arguments textbox. This makes the VS use a separate registry hive for all its settings. If something goes wrong with the integration code your main VS installation remains intact.
  8. Hit Ctrl+F5 to launch the VS or F5 if you want to attach a debugger right away. Note that the debugger loads lots of symbols for VS when you attach it so it’s gonna take a while.

Build IronRuby or IronPython binaries using msbuild command line tool

Change the working directory to c:\path\to\Solutions and run one of the following commands:

msbuild Ruby.sln /p:Configuration=Debug

produces a debug build for .NET Framework 4.0,

msbuild Ruby.sln /p:Configuration=Release

produces a release build for .NET Framework 4.0,

msbuild Solutions\Ruby.sln /p:Configuration=Silverlight4Debug

produces a debug build for Silverlight 4,

msbuild Ruby.sln /p:Configuration=Silverlight4Release

produces a release build for Silverlight 4,

msbuild Ruby.sln /p:Configuration=Silverlight3Debug

produces a debug build for Silverlight 3, which is what you need for Windows Phone 7,

msbuild Ruby.sln /p:Configuration=Silverlight3Release

produces a release build for Silverlight 3/WP7,

If the build is successful the binaries are stored in C:\path\to\bin\{ConfigurationName}
The same commands applied on IronPython.sln build flavors of IronPython.

You can find an alias defined in Alias.txt for most of these commands.

Build IronRuby.msi and IronPython.msi installers

Change the working directory to c:\path\to\Msi and run the following command:

msbuild Installer.proj /p:Configuration=Release

You’ll find both .msi files in C:\path\to\bin\Release directory if the build is successful.

.NET Tips

Mono

Instructions for building on Mono:

The Mono runtime

Your best choice is to install the latest Mono release, you can find instructions and downloads on the mono page .

If you prefer to build mono yourself you can find building instructions for different OS on the mono page .

Build IronPython and IronRuby

git clone https://github.com/IronLanguages/main.git ironlangs
cd ironlangs

The steps for the build are:

xbuild /p:Configuration=Release Solutions/Ruby.sln
xbuild /p:Configuration=Release Solutions/IronPython.sln

Note: If it fails the first time, try to build it again. xbuild seems to have some issues properly ordering the build, causing some assemblies to be built before their dependencies are. The second build has the dependencies in place and everything should work just fine.

Commands are deployed to the ~/bin/Release directory.

You can run it with Mono

mono ir.exe

Install IronPython and IronRuby on Unix-like systems

Create file ipy with the following content:

#!/bin/sh

EXE_PATH=YOUR_PATH
mono $EXE_PATH/ipy.exe “$@”

Replace YOUR_PATH with the absolute path of bin/Release.

Create file ir with the following content:

#!/bin/sh

EXE_PATH=YOUR_PATH
mono $EXE_PATH/ir.exe “$@”

Again, replace YOUR_PATH with the absolute path of bin/Release.

Make the scripts executable by entering

chmod +x ir ipy

Copy ir and ipy to a directory that is listed in your PATH environment variable, e.g. /usr/local/bin/

Mono Tips