Система Orphus
Версия для печати

Nemerle – integration for VS 2008

Автор: VladD2
The RSDN Group
Опубликовано: 13.09.2003
Исправлено: 27.05.2009
Версия текста: 1.1
How to build the project
Building the compiler from source using MSBuild
Building the compiler from source using GNU make
Possible problems
How to get involved in the development of VS 2005 integration and Nemerle compiler?
Unit tests
General information


This project is dedicated to the creation of Nemerle integration for VS 2008. Minimum goals for the project are to implement:

  1. Code completion on input.
  2. Quick Info tooltip display when the cursor is over an identifier.
  3. Full-fledged syntax highlighting (according to macros and types imported into the particular file).
  4. Quick Info tooltip display for function parameters.
  5. Code navigation.
  6. WinForms designer.
  7. Simple code snippets.

The following features may be implemented later on:

  1. Refactoring.
  2. Semantic constructs look-up.
  3. Visual Web designer support.
  4. Support for automatic snippets generated at run-time for imported macros.
  5. SVN support.
  6. Other delightful features have been forgotten to enlist.


BSD-style open source. In a nutshell: You must mention the authors in your products’ “About”s, readme etc. and your derived code must also retain all copyright notices and refer to them as appropriate.

How to build the project


Read this instruction up to the end!

You will need the following to build the project:

  1. Have an SVN client (like TortoiseSVN) installed.*
  2. Have a VS 2008 installation with the modules for C# and C++.*
  3. Have a VS 2008 SP 1 installation.
  4. Download (from Microsoft download center) and install the VS SDK version 1.1.
  5. Checkout our update to the latest Nemerle compiler sources from the SVN repository (http://nemerle.org/svn/nemerle/trunk). You may try to access by https if http doesn’t work for you. See Hacking for details. *
  6. If you have installed Nemerle binaries before using msi installer then correct «Nemerle» environment variable: remove quotation-marks (it was a bug in 0.9.3 installer) and change it if you plan to install newly compiled binaries to another directory. Warning! You must build the latest compiler version yourself from the SVN sources to work with this project.
  7. Compile Nemerle compiler project. It can be don by run BuildAndReg-1-phase.cmd, BuildAndReg-Release.cmd or BuildAndReg.cmd.
  8. Download and install NUnit version 2.2.8. or higher.
  9. Start VS and open Nemerle.VSIP.sln.
  10. Set Nemerle.VsIntegration as a StartUp project.
  11. Open Nemerle.VsIntegration project properties and find Debug tab. Set “Start external program:” field to «%VS80COMNTOOLS%..\..\Common7\IDE\devenv.exe». Set «Command line arguments:» field to «/ranu /rootsuffix Exp».
  12. Build the solution and run the project.

If all the steps above were performed correctly an experimental version of VS2005 where you can test Nemerle integration should start.

Building the compiler from source using MSBuild

You can use batch files located in the root folder of the compiler’s SVN trunk to build Nemerle compiler from source. Here is their description:

Building the compiler from source using GNU make

This is the approach used by the main compiler developers. If you want to perform it on a Windows machine you have to install Cygwin.


* If you don’t understand what does this mean and unable to find relevant information using Google and Nemerle web site this project is probably not for you. Sorry.

Possible problems

If you try to recompile Nemerle compiler binaries using an opened Visual Studio and you have used previous compiler versions at least once you’ll see a lot of twinkling text at the registration stage and the number of files copied will be different from anticipated 4, 1, 5. Just close the studio and run the compilation and pre-JIT from the command line again.

Notice that you’ll have to force rebuild of the integration project after every new build of Nemerle compiler assemblies.

How to get involved in the development of VS 2005 integration and Nemerle compiler?

You can obtain login and password that will grant you access to the SVN repository with the sources and you’ll be able to work on them and commit the changes (see below). You should realize that this implies a certain degree of responsibility and your changes may affect integrity of the project. So you should be accurate and attentive and your changes should be reasonable. Usually the best way to start is to ask questions and participate in the discussion in the Nemerle Google group and join developers’ mailing list. You may find information how to subscribe here. Conference archives are available here. There’s also a forum for Russian-speaking people solely dedicated to the integration project: http://rsdn.ru/Forum/?group=prj.nemerle. Be polite and respect other people opinions.

Follow the coding style of the original code while making your changes.

You can send patches (created automatically by SVN client) personally to the integration project’s lead developers (VladD2 and IT at the moment – see http://nemerle.org/svn/nemerle/trunk/misc/users for contact information) until you have a personal SVN login. Or you can also attach patches to your developers’ mailing list postings. Please don’t attach patches with the size of more than 100 Kb.

To obtain an SVN login you should generate a password hash here first. Then you should send the generated hash to the project admin Michal Moskal [malekith A T nemerle.org]. After obtaining permission add yourself and your contact information to the http://nemerle.org/svn/nemerle/trunk/misc/users.

Information about the main developers of Nemerle can be found here.

Unit tests

The VS2005 integration project contains unit tests. NUnit framework (http://www.nunit.org/) with the version 2.2.8 or higher is required to run them.


If you do not install NUnit you will get error messages during compilation of the lntegration solution projects because they contain references to NUnit assemblies.

You may encounter debugger crashes/freezes while debugging in VS 2005 in interactive mode for prolonged periods of time. This makes complicated problems hard to debug. This is one of the reasons why it is desirable to employ unit tests as a good replacement for interactive debugging. Nemerle.Compiler.Utils project contains unit tests in Nemerle.Completion2\Tests subdirectory. (Note: Completion Engine will possibly be renamed to IntelliSense Engine in the future).


contain sample code that is parsed in the tests. More files or even whole projects will be possibly added here in the future.

Nemerle.Completion2\Tests\Tests.Init.n file contains IntelliSense Engine initialization code and misc helper methods (for IDE text keyboarding emulation for example).

Nemerle.Completion2\Tests\Tests.n file contains the tests themselves.


If you find a bug try to make a reproducible test case. This will reduce the time and effort to fix it.

You may also use unit tests to study IntelliSense engine internals and for debugging. It is recommended to avoid writing big and slow tests.

General information

The main Nemerle website is http://nemerle.org/. There are also some articles about Nemerle and the VS2005 integration project in Russian on RSDN.

Любой из материалов, опубликованных на этом сервере, не может быть воспроизведен в какой бы то ни было форме и какими бы то ни было средствами без письменного разрешения владельцев авторских прав.