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

Building

mazur edited this page Jun 2, 2011 · 45 revisions
Visual Studio
Command line
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.

Note for VS Express users: you may see warnings about mscorlib or System not being found when using VS Express; just ignore those as it doesn’t seem to handle conditional references for Silverlight. However, this means that Silverlight builds won’t work from the IDE. If you absolutely need to build from the IDE, run this script to transform the csproj files to work in VS Express. Otherwise, see the section below about building from the command line.

If you want to launch a Visual Studio instance that loads IronRuby or IronPython Tools that you’ve just built follow these steps:

  1. Select IronRubyTools or IronPythonTools project as a “startup project” (doesn’t matter which one, either of them launches VS with both languages enabled).
  2. Open Properties page of the selected project (Alt+Enter or from context menu).
  3. 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.
  4. 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.
  5. 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.

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 IronRuby

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

The steps for the build are:


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

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

You can run it with Mono

mono ir.exe

Tips