-
Notifications
You must be signed in to change notification settings - Fork 347
Building
Visual Studio |
Command line |
.NET Tips |
Mono |
Mono Tips |
- Start Visual Studio 2010.
- 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.
-
- 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: - Select IronRubyTools or IronPythonTools project as a “startup project” (doesn’t matter which one, either of them launches VS with both languages enabled).
- Open Properties page of the selected project (Alt+Enter or from context menu).
- 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
. - 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. - 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.
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.
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.
- Make sure .NET 4.0 is installed on your machine.
- Make sure that csc.exe is in your PATH environment variable. Default location is:
c:\Windows\Microsoft.NET\Framework\v4.0.30319
Instructions for building on Mono:
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 .
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
Create file ipy
with the following content:
#!/bin/shEXE_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/shEXE_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/
- Make sure dmcs is installed on your machine
- dmcs was included starting with Mono 2.6