Jump to content
  • Migrate existing projects to the new workflow in Spotfire® Developer


    This article explains how to Migrate existing projects to the new workflow in Spotfire® Developer

    Back to main C# extensions page

    With Spotfire 7.13 come a new, simplified workflow for developing Spotfire extensions. In the Spotfire Developer Documentation you can learn how to create an extension project with the new workflow. If you want to use the new workflow for an existing project, you need to modify the project?s configuration. This tutorial will walk you through the steps needed to migrate an existing SDK project. The same procedure can be applied to your own projects. 

    1. In the "MyExtensions" folder, create a subfolder, here called "Examples".

      The subfolder may contain several migrated SDK examples. By having a subfolder like this there will be the same amount of folder levels relative to the binaries as it is in the original Examples\Extensions folder which make the project files work without change. If you decide to store your SDK project somewhere else, some paths in the post-build step must be changed. More about that under "Customizing the environment and advanced information" section in the Spotfire Developer Documentation.
       
    2. Copy SpotfireDevloper.snk from the Examples\Extensions folder to the "Examples" folder.
       
    3. Copy an existing project folder to the "Examples" folder. For example Extensions\Examples\SpotfireDeveloper.CustomPanelExample.

      1.png.3ba279a9235495ab6a15791f01ce326e.png

       
    4. Copy "PostBuildEvent.bat" and the Example.pkdesc file from the Templates folder to the project folder.
       
    5. Rename the pkdesc file to be the same as the csproj file (but with the -pkdesc extension instead).

      2.png.fad80f708ef4b838f1e1c2abb8d0ba61.png

       
    6. In the pkdesc file: update the "Name", "SourceFile" and "TargetFileName" attributes with a value that corresponds to the dll file that will be built. Normally this is the same as the name of the project file.

      3.png.3b24b08079660ec10c486a1a962051de.png
       
    7. Copy the ID from the module.xml file to the "SeriesId" attribute in the pkdesc file. This ID is used as a unique identifier for the generated package (.spk) file. If you instead want to create a new package, you need to create a new GUID as identifier in the pkdesc file (Tools > Create GUID in Visual Studio). 
       
    8. Remove the module.xml file from the project folder.
       
    9. Open the project in Visual Studio.
       
    10. Remove module.xml from the project.

      4.png.68b81e8fb5b673165aaac0f0a63b57a6.png
       
    11. Open Project properties.
       
    12. Set post build event (in Project properties -> Build Events tab) to:

      "$(ProjectDir)PostBuildEvent.bat" "$(ProjectDir)" "$(ProjectName)" "$(TargetDir)" "$(ConfigurationName)"

      Note: This step assumes that you have used the recommended folder structure. If you decide to store your SDK project somewhere else, some paths in the post-build step must be changed. More about that under "Customizing the environment and advanced information" section in the Spotfire Developer Documentation .

      5.png.0a4dc2dba289e64415ddf4d142a26477.png

       
    13. Set "Start External Program" in the Debug tab. Point to a "Spotfire.Dxp.exe" on your computer. It could be your installed version, some intermediate beta-version or similar.

      6.png.9cedce657404b64a7e5a51cdf60c38ac.png

       
    14. Set Command line arguments to "/loadallmodules /addmodulefolder:<path to the Module-folder in your SDK>". For example ?/loadallmodules /addmodulefolder:"C:\SDK\SDK 7.13\MyExtensions\Build\Modules".

      The argument "/loadallmodules" forces Spotfire to load the highest version of all modules it can find in the set of module-folders, regardless of the deployed packages on the selected deployment area.

      The argument "/addmodulefolder" adds a path to a folder where Spotfire should search for modules to load. The argument can be repeated if more folders needs to be added.

      7.png.31547cb276a15a40802726d6174d5eaa.png

       
    15. Save the project.
       
    16. Press F5 in Visual Studio to build the project and launch Spotfire from the debugger.
       
    17. In Spotfire, under Help > Support Diagnostics and Logging, scroll down the list of loaded files to verify that the extension has been loaded.

      8.png.a1ed52a677c160b1458a01822fa88221.png

    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...