As of v2.2 ROOT.NET libraries are distributed with NuGet in addition to the traditional way (a very large download). NuGet is an open source package manager with online catalogs. Among other things, the NuGet distribution allows for smaller installations and makes it possible to keep versions of ROOT.NET around for many different builds of ROOT (indeed, if you don’t see one you need, send me email and I’ll see what I can do). If you’ve not used NuGet I encourage you to explore it – there is an amazing amount of stuff in there that is often instantly useful (even for something like science/data analysis!).

Setup

Besides installing ROOT and Visual Studio on your machine, you’ll also have to get NuGet installed. How you use it depends on if you are using it with VC 2010 Professional or above or you are using it with the Express version. For the latter you’ll need to use the command line interface. For the installation start here.

NuGet is initially configured to get its package list off the central NuGet web site. However, since I’m generating lots of packages (see below) I didn’t want to upload everything there – so I’ve got my own NuGet package feed. You’ll need to configure that.

  1. Open the config for NuGet: Tools –> Options –> Package Manager. Select “Package Sources”.
  2. Enter “ROOT.NET Packages” for the Name and http://deeptalk.phys.washington.edu/rootNuGet/nuget for the Source.

You are ready! Do not install ROOT.NET!

Quick Run-Through

There is a quick sample ROOT.NET program that can be found here. This be based on that work.

  1. Open Visual Studio and create a new C# console application.
  2. Right click on the console application in the solution explorer and select Manage NuGet Packages.
  3. Select the “ROOT.NET Packages” feed on the right hand side of the dialog box that pops up.
  4. Now the tricky part. Find the “Core” for the proper version of ROOT you have installed.
    • You still must match the version of ROOT you have installed on your machine to the version of ROOT that was used to build the wrappers.
    • The total wrapper libraries are split into Core, Graphing, PROOF, and ALL. Look at the description to see what list of libraries are in each to decide what you need. Note that ALL will cause Core, PROOF, Graphing, and Core to be installed. Similar dependencies exist with the others as well.
  5. Click the install button. Once done the wrappers will be part of your project!
  6. Cut/Paste the code from the previous demo into your main C# file.
  7. Click Run!

Note that the packages.config file got added to your project. This lists the packages your project depends on. If you are using source control makes sure this puppy goes in! There are ways to use it as input to NuGet to force package updates when your source code moves from machine to machine.

More Information

Last edited Sep 2, 2011 at 1:09 AM by gwatts, version 2

Comments

No comments yet.