Co-deploy .NET
If you’re using an OpenFin native language adapter (API), they come with automatic lightweight deployment built in. By simply using the API to run your HTML5 application, you’re able to install your applications. An optional addition to this deployment model is to pre-package the initial version of the OpenFin Runtime that the application requires. Below is an example of how to co-deploy with the .NET Adapter.
To co-deploy the OpenFin Runtime with your .NET Application, you will need to have the “Assets” Folder structure as part of your installer and then pass the location of the folder to the RuntimeOptions Options.
Make sure to include your licenseKey
in RuntimeOptions.LicenseKey
when launching apps from the .NET Adapter. If you're interested in an Enterprise license, please contact us for one.
Assets folder
The Asset folder should contain two folders: The “Runtime” folder containing the OpenFin Runtime extension less download obtained from versions page and the “RVM” folder containing a “latestVersion” file that is a simple text file with the downloaded RVM version number and the extension less download of the RVM renamed to latest. Once created the the contents should be:
- Assets [Folder]
- Runtime [Folder]
- 5.44.7.35 [File: This should be the extension less file obtained by downloading said runtime version]
- RVM [Folder]
- latestVersion [File: This should be a text file containing the RVM version: e.g. 2.0.0.1]
- latest [File: This should be the extension less file obtained by downloading said RVM]
The Files referred to above can be found on our versions page.
AssetPath RuntimeOptions flag
The AssetPath property of the RuntimeOptions class should be set to the Asset folder location created above, relative paths can be used. The Files referred to above can be found on our versions page.
var runtimeOptions = new Openfin.Desktop.RuntimeOptions
{
//this version should match the version file in the folder structure.
Version = "5.44.7.35",
RemoteDevToolsPort = 9090,
EnableRemoteDevTools = true,
AssetsPath = @"C:\tmp\Documents\Projects\assets"
};
runtime.Connect(() =>
{
//Code.
});
If OpenFin is not present on the system the setup above will start the provided RVM and extract and run the co-deployed version of OpenFin.
For more information around co-deploying applications, please view our knowledge base or contact [email protected].
Updated 5 months ago