Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Native 32 & 64 bit .NET StarTeam SDK’s

Native 32 & 64 bit .NET StarTeam SDK’s

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();

..

 

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.

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Comments

Where is the link for downloading the SDK?

there are clear links for downloading J#

I expect in this article to have clear link for downloading the sdk (or how to find it in the client or server installation)

What am I missing?

Where should the zip file be taken from?

in "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. 13 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."

I see links for patches but I fail to find link to "Latest StartTeam .Net SDK"

Should it be downloaded from this site or from other site?

Should it be part of the client installation?

(My client version is 14.0 but the SDK folder is 11.0)

Should it be part of the server installation?

 If so - where to find it on the server?

Version history
Revision #:
1 of 1
Last update:
‎2012-10-19 16:13
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.