Migrate an existing MDK plugin to .NET 8

Here is an overview how to migrate your MDK plugin to .NET 8

Migrate projects

  1. Use our DevKit Tools plugin to create a new, empty plugin project using exactly the same name (Namespace) as your existing plugin.

  2. Copy all your (source) files from the existing one into the new project folder. Allow overwriting of PluginTexts*.* PluginManifest.xml. Don't overwrite the newly created project file (*.csproj)

  3. Edit your Properties\AssemblyInfo.cs file and remove all assembly versioning related entries. You can specify them in the "Packaging/General" section of your projects properties or add them manually directly into the global "PropertyGroup" of the project file. This looks something like:

    AssemblyInfo settings
    <AssemblyTitle>Articy.AssetsToEntities</AssemblyTitle>
    <Company>Articy Software GmbH &amp; Co. KG</Company>
    <Product>Articy.AssetsToEntities</Product>
    <Copyright>Copyright © 2017-2024</Copyright>

  4. Check/set all your custom resource files/images and set the "Copy To Output Directory" and "Build Action" settings as required

  5. Use the NuGet Package Manager to add possible depenencies. Keep in mind that .NET 8 needs at least the availability of .NET Standard 2.0 ones.

  6. Now a recompilation should work. Check if your dependencies are properly copied to the output directory ...\bin\Debug\net8.0-windows\win-x64

    If you don't see them there you should check your project file for the following setting in the global PropertyGroup

    Copy Dependencies to output
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

  7. If your plugin uses Windows Forms edit your project file and add the following lines to the global PropertyGroup.

    Adding Windows Forms
    <UseWinFormsOutOfProcDesigner>False</UseWinFormsOutOfProcDesigner>
    <UseWindowsForms>true</UseWindowsForms>

  8. As part of the migration to .NET 8 we also updated some of our libaries. While updating JSON.NET should not impact your code, our used Excel Library ClosedXML had some API changes. Those should be easily fixed. For a guide take a look at the ClosedXML migration guide here: ClosedXML - Migration from 0.97 to 0.100