Application Delivery Management
Application Modernization & Connectivity
CyberRes by OpenText
IT Operations Management
The 64 bit StarTeam SDK for .NET is packaged and available as a .zip for xcopy deployment. The .zip contains 5 64 bit compliant .dll’s, and is named with the full version number of the SDK build (e.g. st-sdknet-runtime-13.0.0.32-win64.zip).
StarTeam.Core.dll, StarTeam.dll, TIBCO.SS.dll (.NET Assemblies compiled using the AnyCPU flag)
StarTeam.Encryption.dll (64 bit native library)
The 32 bit SDK is also available as a .zip for xcopy deployment. It is similarly named, except for the platform, which is win32 rather than win64. (e.g. st-sdknet-runtime-15.0.0.162-win32.zip). In this case, the 5 .dll’s are all 32 bit compliant.
StarTeam.Core.dll, StarTeam.dll, TIBCO.SS.dll (.NET Assemblies compiled using the AnyCPU flag)
StarTeam.Encryption.dll (32 bit native libray)
Installation and Deployment.
The StarTeam SDK for .NET depends upon the Microsoft J# assembly.
For 64 bit platforms, the package can be downloaded and installed from the following link on the Microsoft web site http://www.microsoft.com/en-us/download/details.aspx?id=15468
For 32 bit installs, the Microsoft J# assembly can be downloaded and installed from http://www.microsoft.com/en-us/download/details.aspx?id=18084
After ensuring that J# is installed, uninstall any older .NET SDK’s (32 or 64 bit) from your 64 bit machine before deploying this .zip. Verify that there are no entries in the Global Assembly Cache (GAC) for Borland.StarTeam, StarTeam, Policy.Borland.StarTeam, or Policy.StarTeam. Verify that there are no folders under c:\Program Files (x86)\Borland\StarTeam SDK Runtime for .NET….; or under c:\Program Files\Borland\StarTeam SDK Runtime for .NET…
XCOPY (i.e unzip) the .zip file to c:\Program Files\Borland\StarTeam SDK Runtime for .NET nn.mm (where nn and mm are the major and the minor version numbers of the SDK build, e.g. 15 and 0 from the example .zip name above). The 32/64 bit .NET sdk is now ready to use. It is not necessary to register the SDK in the GAC.
Note that you could equally well copy the .dll's into your application path or folders directly. (you do not need to create a Borland (or Micro Focus) folder for them)
Please also note that one does not need to install .NET 2.0 on the machine.
All one need install is the (32 or) 64 bit J# assembly from the Microsoft web site, which are built as 2.0 assemblies (as is the StarTeam SDK), and so far, are guaranteed to run in all .NET runtimes upto 4.6.2, and tested, so far, using all versions of Visual Studio up to VS2015.
Development and Release.
If you are using the VS 2005, 2008 or VS2010 development environments, create a small new C# project, pick the solution platform AnyCPU, add explicit references to StarTeam.dll, StarTeam.Core.dll and TIBCO.SS.dll.
You may run into a problem with VS 2010 . A TypeInitializationException exception will be thrown on the first line of the test code. VS 2010 copies dependent assemblies to the bin/Debug (or bin/Release) folders, and you may see vjslib.dll and vjscw.dll copied into the folder. These assembly .dll’s will have been copied from C:\Windows\Microsoft.NET\Framework64\v2.0.50727. Manually copy vjsnativ.dll from this folder over to your bin/Debug or bin/Release folder and run your test. This time it should work without any issue.
(Note that if you are attempting to deploy a web application using IIS, you will need to copy vjsnativ.dll to the IIS Folder. Directory.GetCurrentDirectory() will help identify the exact path to the running service.
You may use VS 2012 or VS 2013, but you can at most target the NET Framework 4.0 using the above strategy. For .NET runtimes 4.0 ,
I have found it is sufficient to add vjslib.dll (the J# runtime assembly) as an explicit project reference, and manually copy vjsnativ.dll to your bin/Debug or bin/Release folder.
You cannot use LoadLibrary in .NET 4.5. The returned handle is 0.
The following alternative approach also works correctly in VS 2010 and above, targeting the .NET Frameworks 4.0, 4.5 and 4.5.1
Manually copy vjsnativ.dll from this folder over to your bin/Debug or bin/Release folder..
declare a static global assembly
private static Assembly vjsLib; (requires System.Reflection namespacve)
initialize it before your first reference to any object instances from the starteam namespace.
String folder = Environment.GetFolderPath(Environment.SpecialFolder.System); (requires System.IO namespace)
folder = Path.Combine(folder, @"..\Microsoft.NET\Framework64\v2.0.50727"); // Framework64 on 64 bit Windows 7 Systems
folder = Path.GetFullPath(folder);
String imagepath = Path.Combine(folder, "vjslib.dll");
vjsLib = Assembly.LoadFrom(imagepath);
keep the vjslib assembly loaded in memory for the life of your application.
Then verify that you can call into the SDK with the following code snippet
Server s = new Server(hostName, port);
. s.LogOn(userName, password);
if (s.IsMPXAvailable)
s.EnableMPX();
Project[] pp = s.Projects;
User[] uu = s.Users;
s.Disconnect();
..
Note for VS2019. I have tested this using VS2019 and .NET SDK 4.7.2.
The one additional change required is to set project build properties Platform Target to x64.The default 'Any CPU' throws a BadImageFormatException.
Packaging.
When packaging your 64 bit .NET SDK based application, please copy all 5 .dll’s from the .zip and the relevant Microsoft vjs* .dll’s into the installation folder of your application, where they will be accessible in the path of the application executable. This is necessary whether your application is a desktop executable, a plugin or running in the IIS web server.