Using an OpenSpan Project in a .NET Solution and Outputting a Standalone Application
Written by Pete Johnson   
Thursday, 28 April 2011 12:49

Published: April 28, 2011

Preface notes:

  • Referencing an OpenSpan project in Visual Studio and creating an standalone .exe also requires the OpenSpan.Runtime.Enterprise.dll or OpenSpan.Runtime.Events.dll. Access to these assemblies is restricted to licensed OpenSpan customers. Without one of the Runtime dlls, the resulting .exe will not run, and will generate a licensing error message. Current customers should contact OpenSpan Support for more information.
  • Customers may also be directed to download a hotfix to OpenSpan 4.5 SP1 Plugin for Visual Studio 2008 that accomodates the necessary managed and unmanaged assemblies needed to build the standalone .exe.

General

With the release of OpenSpan Studio 4.5, developers can use OpenSpan projects directly as .NET components in Visual Studio 2008. This allows development teams to produce hybrid code-based solutions while including projects specifically designed in OpenSpan.

This article includes links to a document containing step-by-step instructions using a short tutorial based on a simple solution using a C# Windows form that interacts with a Windows application, and the test solution itself. (Note: You must be a registered user to have full access to the attachments.)

The solution is called OSNotepadInDotNet. It incorporates a Windows form in C# and an OpenSpan Windows adapter from an interrogation in OpenSpan Studio of the simple Notepad application. Both parts are pulled into a .NET solution with all appropriate references and support files. You'll use this solution to build an installer to output an .msi file containing all required assemblies.

Objectives

At the conclusion of the exercise, you will be able to:

  • Describe the parts of a .NET solution that include an OpenSpan project
  • Add an Installer project to a solution
  • Collect the correct assembly references for output
  • Output all necessary parts into a .msi installation package
  • Install the package
  • Run the solution independently, with all referenced components present and functional

Requirements

  • Familiarity with Visual Studio and .NET concepts
  • OpenSpan Plugin for Visual Studio 2008, 4.5 SP1_500 or later, fully installed (must incorporate Hotfix 12539)
  • Access to the OpenSpan Support Portal.