Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:dotnetexpresseditions [2015/09/14]
127.0.0.1 external edit
developer:dotnetexpresseditions [2016/01/20] (current)
sandy
Line 1: Line 1:
 ====== Using Express Editions of VB.NET and C# ====== ====== Using Express Editions of VB.NET and C# ======
-> **Summary:​** //How to build and debug Rhino.NET plug-ins for Rhino4 ​with the free express editions of Microsoft VB.NET 2008 and C# 2008// +> **Summary:​** //How to build and debug Rhino.NET plug-ins for Rhino 4 with the free express editions of Microsoft VB.NET 2008 and C# 2008.// 
-> **NOTICE:** //The Rhino.NET SDK is deprecated in Rhino 5.  This article adapted for the new RhinoCommon SDK and latest version of Visual Studio is [[developer:​rhinocommonsamples:​dotnetexpresseditions|here]]//​+> **Notice:** //The Rhino.NET SDK is deprecated in Rhino 5.  This article adapted for the new RhinoCommon SDK and latest version of Visual Studio is [[developer:​rhinocommonsamples:​dotnetexpresseditions|here.]]//
  
-Microsoft now provides free trimmed down versions of there developer products called ​"Express Editions." ​The two products in particular that I will be discussing ​here are the express editions of:+Microsoft now provides free trimmed down versions of their developer products called ​//Express Editions//. The two products in particular that I discuss ​here are the express editions of:
  
   * VB.NET (http://​msdn.microsoft.com/​vstudio/​express/​vb/​)   * VB.NET (http://​msdn.microsoft.com/​vstudio/​express/​vb/​)
   * C# (http://​msdn.microsoft.com/​vstudio/​express/​visualcsharp/​)   * C# (http://​msdn.microsoft.com/​vstudio/​express/​visualcsharp/​)
  
-These products ​can be used to develop .NET plug-ins for Rhino 4. Here are some helpful steps to get you started:+Use these products to develop .NET plug-ins for Rhino 4. Here are some helpful steps to get you started:
  
 ---- ----
 **Download and install VB.NET or C#** **Download and install VB.NET or C#**
  
-Choosing between VB.NET and C# is really ​a matter of syntax preference. Both programming languages should be able to build to same quality ​of plug-in; it just depends on the langauge ​that you feel "more" ​comfortable with. If you are not sure, download ​them both.+Choosing between VB.NET and C# is a matter of syntax preference. Both programming languages should be able to build to the same quality plug-in. It just depends on the language ​that you feel //more// comfortable with. If you are not sure, download both.
  
-The installer ​let'​s ​you choose which components to download and install. The default settings work fine for developing Rhino plug-ins. The extra items that are unchecked that you may be unsure about are:+The installer ​lets you choose which components to download and install. The default settings work fine for developing Rhino plug-ins. The extra unchecked ​items that you may be unsure about are:
  
-  * Microsoft MSDN 2008 Express Edition - This is documention for the product and the .NET class libraries. ​All of this information ​can also be found online at http://​msdn.microsoft.com. I choose to leave this option unchecked. +  * Microsoft MSDN 2008 Express Edition - This is documention for the product and the .NET class libraries. ​You can find all this information online at http://​msdn.microsoft.com. I leave this option unchecked. 
-  * Microsoft SQL Server 2008 Express Edition - You may want this if you are interested in developing applications that work with SQL databases. This can also be downloaded and installed at a later date from the Microsoft website. I choose to leave this option unchecked.+  * Microsoft SQL Server 2008 Express Edition - You may want this if you are interested in developing applications that work with SQL databases. This can also be downloaded and installed at a later date from the Microsoft website. I leave this option unchecked.
  
 ---- ----
 **Install the Rhino.NET plug-in project and command wizards** **Install the Rhino.NET plug-in project and command wizards**
  
-  * [[http://files.mcneel.com/wiki/RhinoDotNetSDK.zip|Rhino 4.0 .NET SDK]] : Project wizards, XML comments, and SDK help CHM file (~20Meg)+  * [[https://www.rhino3d.com/download/rhino/4.0/​rhinodotnetsdk|Rhino 4.0 .NET SDK]]: Project wizards, XML comments, and SDK help CHM file (~20Meg)
  
 ---- ----
 **Create a Rhino plug-in project** **Create a Rhino plug-in project**
  
-  - Start either VB.NET or C# and go to File...New Project. You should see an option for Rhino Plug-In. Select this, provide a name for your project, and click OK. I choose the default project name of MyPlugIn1 +  - Start either VB.NET or C# and go to **File...New Project**. You should see an option for **Rhino Plug-In**. Select this, provide a name for your project, and click **OK**. I choose the default project name of MyPlugIn1. 
-  - A dialog should appear with options that the wizard uses when creating your plug-in project. Please note that you can always change these options at a later time in the code; these options just allow the wizard to fill out typical plug-in information. I choose to not change any of the default values and clicked ​the Finish button. +  - A dialog should appear with options that the wizard uses when creating your plug-in project. Please note that you can always change these options at a later time in the code; these options just allow the wizard to fill out typical plug-in information. I choose to not change any of the default values and click the **Finish** button. 
-  - Once your project is created, save it. I clicked ​on File...Save All to save the project to the location of my choice.+  - Once your project is created, save it. I click on **File...Save All** to save the project to the location of my choice.
  
 ---- ----
 **Compile the plug-in** **Compile the plug-in**
  
-I like to have the output window ​showing ​when compiling my projects. This way I can see what is going on. To show this window, click on Debug... Windows ... Output+I like to have the output window ​show when compiling my projects. This way I can see what is going on. To show this window, click **Debug... Windows ... Output**.
  
-You have to compile your project into a DLL (assembly) before you can try it in Rhino. ​This can be done by clicking ​on Build... Build //my project name//. The output window will tell you if everything went ok.+You have to compile your project into a DLL (assembly) before you can try it in Rhino. ​Do this by clicking ​**Build...** Build //my project name//. The output window will tell you if everything went ok.
  
 ---- ----
 **Debugging the plug-in** **Debugging the plug-in**
  
-Here's the tricky part (and it's not really that tricky.) The express editions don't expose controls to set up your plug-in project for debugging. ​In order to debug your plug-in, ​you need to tell the compiler that you want rhino4.exe to start and then have the debugger latch on to that process.+Here's the tricky part (and it's not really that tricky.) The express editions don't expose controls to set up your plug-in project for debugging. ​To debug your plug-in, tell the compiler that you want rhino4.exe to start and then have the debugger latch on to that process.
  
-In order to set up the debugger for your project, perform the following steps:+To set up the debugger for your project, perform the following steps:
  
-  * Shut down VB.NET or C# +  * Shut down VB.NET or C#. 
-  * Open file explorer and go to the location of your project. This is where the file with the extension .vbproj or .csproj is located +  * Open file explorer and go to your project ​location. This is where the file with the extension .vbproj or .csproj is located. 
-  * Unzip and Copy [[http://​wiki.mcneel.com/​_media/​legacy/​en/​ExpressDebug.zip|THIS FILE]] to the directory of your project +  * Unzip and copy [[http://​wiki.mcneel.com/​_media/​legacy/​en/​ExpressDebug.zip|this file]] to the directory of your project. 
-  * This file needs to be renamed ​to the same name as your .vbproj file or .csproj file with .user appended to the end. For example: +  * Rename this file to the same name as your .vbproj file or .csproj file with .user appended to the end. For example: 
-    * If your .vbproj file is called MyFirstRhinoPlugIn.vbproj,​ then rename the downloaded file to MyFirstRhinoPlugIn.vbproj.user +    * If your .vbproj file is called MyFirstRhinoPlugIn.vbproj,​ then rename the downloaded file to MyFirstRhinoPlugIn.vbproj.user. 
-    * If your .csproj file is called MyCSharpRhinoPlugIn.csproj,​ then rename the downloaded file to MyCSharpRhinoPlugIn.csproj.user +    * If your .csproj file is called MyCSharpRhinoPlugIn.csproj,​ then rename the downloaded file to MyCSharpRhinoPlugIn.csproj.user. 
-  * Open the downloaded file with notepad. You will notice that it is a very short XML file with a path to Rhino4.exe in it. Make sure that the path to Rhino4.exe is the same as where Rhino4.exe is located on your computer.+  * Open the downloaded file with Notepad. You will notice that it is a short XML file with a path to Rhino4.exe in it. Make sure that the path to Rhino4.exe is the same as where Rhino4.exe is located on your computer.
  
 ---- ----
 **Run your plug-in** **Run your plug-in**
  
-Once you've done the above, reopen your project in VB.NET or C# and click on Debug... Start Debugging. If you were successful, Rhino will start.+Once you've done the above, reopen your project in VB.NET or C# and click **Debug... Start Debugging**. If you were successful, Rhino will start.
  
-Load your plug-in with the PlugInManager. Once your plug-in loads, try running the custom command that the wizard defined in your plug-in. If you click on the properties button in the plug-in manager you will see that your plug-in has a command named something like MyPlugIn1Command+Load your plug-in with the PlugInManager. Once your plug-in loads, try running the custom command that the wizard defined in your plug-in. If you click on the properties button in the plug-in manager you will see that your plug-in has a command named something like MyPlugIn1Command.
  
  
  
 {{tag>​Developer dotnet}} {{tag>​Developer dotnet}}
- 
developer/dotnetexpresseditions.txt · Last modified: 2016/01/20 by sandy