Site Tools


Compiling and Debugging .NET plug-ins for Rhino 5 (and 4)


If you are developing .NET plug-ins for Rhino 5

  • Use Visual Studio 2010 (any edition is fine). Service Pack 1 is highly recommended.
  • Set your plug-in to target .NET 4 client profile.

If you are developing .NET plug-ins for Rhino 4

  • Use Visual Studio 2005, 2008, or 2010.
  • Set your plug-in to target a .NET version less than 4 (most likely .NET 2 is all you will need).
  • Rhino 4 .NET plug-ins will continue to run in Rhino 5.

Details

Rhino 4 loads the .NET 2 runtime which allows plug-ins that target .NET 2, 3, and 3.5 to run as long as users have those frameworks installed. Rhino 4 can not use assemblies which target .NET 4.

Rhino 5 loads the .NET 4 runtime which allows plug-ins that target .NET 2, 3, 3.5, and 4 to run as long as users have those frameworks installed. The Rhino 5 installer ensures that at least the .NET 4 client profile is installed on a user's computer. (Client profile is a smaller version of .NET 4 which doesn't include things like ASP.NET or the Oracle database provider.)

Visual Studio 2005 and 2008 existed before the .NET 4 runtime was available and are unable to debug code when running under .NET 4. Even if a plug-in is targeting .NET 2, it will be loaded and executed under .NET 4 when running in Rhino 5.

Visual Studio 2010 can debug inside of either the .NET 2 or .NET 4 runtimes.

For a while there was a trick to getting Rhino 5 to load .NET 2 instead of .NET 4 by passing a command line flag of /dotnetversion=2. This flag no longer works in the 64-bit version of Rhino 5 as the Rhino_DotNet assembly for 64-bit Rhino 5 requires .NET 4. The flag should continue to work in the 32-bit version of Rhino 5, but will become less and less useful over time as many of the core .NET plug-ins for Rhino 5 no longer work (toolbars, RhinoScript, and Python editors…).

developer/rhino5dotnetplugins.txt · Last modified: 2016/04/04 by sandy