# Changes between Version 12 and Version 13 of Documentation/DevelopmentCenter/DownloadAndBuildSource

Ignore:
Timestamp:
06/26/14 17:34:16 (6 years ago)
Comment:

--

Unmodified
Added
Removed
Modified
• ## Documentation/DevelopmentCenter/DownloadAndBuildSource

 v12 * In the dialog on the top select ".NET Framework 4" * On the right choose "Other Project Types > Visual Studio Solutions" and select the "Blank Solution" template or alternatively type "Blank Solution" in the search box on the right * Use "MyPlugin" as Name and click "Browse..." to select the extension folder and click Ok * In the Solution Explorer right-click the MyPlugin solution and select "Add > New Project..." * Use "GreatIdea" as Name and click "Browse..." to select the extension folder and click Ok * In the Solution Explorer right-click the "GreatIdea" solution and select "Add > New Project..." * On the right choose "Visual C#" and select the "Class Library" template * As name pick "HeuristicLab.GreatIdea.ThePlugin" You're presented with a minimal project set up for developing a new class library (dll). Before we continue we want to adjust the project configuration to make development convenient. * Open the project properties and go to "Build" * Change the first box from "Active (Debug)" to "All Configurations" * Enter ..\..\..\stable\bin in the output path * Then click on "Debug" on the left, choose "Start external program" and select HeuristicLab.exe inside StableRoot\bin - this setting is stored in the .csproj.user file * Then click on "Signing" on the left, activate "Sign the assembly" and create a new key * Call it "TheKey", but deselect the password option * Save the project and close the properties This ensures that the generated plugin is automatically added as a plugin to the HeuristicLab build and that we can use our solution to start a debugging session (shortcut ). Now, we want to make this class library a HeuristicLab plugin. This requires that we include a special class that designates this dll to be a plugin. * For the project add a reference to HeuristicLab.PluginInfrastructure.dll in StableRoot\bin * Open the properties of the reference and set "Copy Local" to false * Rename Class1.cs to Plugin.cs by selecting it and pressing * Replace the code in the file with the following code snippet {{{ #!csharp using HeuristicLab.PluginInfrastructure; namespace HeuristicLab.GreatIdea.ThePlugin { [Plugin("HeuristicLab.GreatIdea.ThePlugin", "Provides an implementation of a great idea", "3.3.9.0")] [PluginFile("HeuristicLab.GreatIdea.ThePlugin.dll", PluginFileType.Assembly)] public class Plugin : PluginBase { } } }}} '''Important''': The plugin class needs to derive from HeuristicLab.PluginInfrastructure.PluginBase so that the dll is realized as a plugin. The attributes specify the details of the plugin and which files it provides. The filename given in PluginFile has to be the same as the assembly output filename in the "Application" tab of the project's properties. '''Important''': Version numbers for plugins can be specified in the style major.minor.build.revision. Changing major or minor version numbers in the course of development marks a breaking change to files. If HeuristicLab's persistence comes across an item saved with a plugin version of 3.3.8 it will accept a new plugin of 3.3.9 to open it, but not when the new plugin version is 3.4.0 or 4.0. For this reason HeuristicLab plugin assemblies are always marked with major and minor number at the end, e.g. HeuristicLab.Core-3.3.dll. This allows to have the same assembly in two conflicting versions. === New plugin with SharpDevelop ===