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.
-
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.
-
Copy SpotfireDevloper.snk from the Examples\Extensions folder to the "Examples" folder.
-
Copy an existing project folder to the "Examples" folder. For example Extensions\Examples\SpotfireDeveloper.CustomPanelExample.
-
Copy "PostBuildEvent.bat" and the Example.pkdesc file from the Templates folder to the project folder.
-
Rename the pkdesc file to be the same as the csproj file (but with the -pkdesc extension instead).
-
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.
-
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).
-
Remove the module.xml file from the project folder.
-
Open the project in Visual Studio.
-
Remove module.xml from the project.
-
Open Project properties.
-
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 .
-
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.
-
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.
-
Save the project.
-
Press F5 in Visual Studio to build the project and launch Spotfire from the debugger.
-
In Spotfire, under Help > Support Diagnostics and Logging, scroll down the list of loaded files to verify that the extension has been loaded.
Recommended Comments
There are no comments to display.