KB 0024
Troubleshooting ASComm.NET Runtime Licensing Issues


CATEGORY

ASComm.NET

 

SYMPTOMS

Applies to Full Development License owners only; does not apply to Single Machine Licenses.

My application runs fine on my development PC, but throws a license exception when deployed to the runtime PC

 

CAUSE

Several steps are required to cause a runtime license to be embedded into your final assembly.

If you are receiving a license exception similar to one of the following, it means that the proper steps were not taken to cause a runtime license to be embedded into your assembly.

License Exception: Unable to locate 'C:\Documents and Settings\All Users\Application Data\Automated Solutions\ASComm.NET\License Manager\AutomatedSolutions.ASComm.AB.Logix.Net.xml'

- or -

License Exception: Trial License expired ...

 

SOLUTION

When you purchase and activate one or more ASComm.NET Full Development Licenses, applications that you build on your development PC can be deployed to runtime PCs with no additional licensing steps or files required on the runtime PC.

This is accomplished by the Visual Studio License Compiler embedding a runtime license into your assembly. The License Compiler is run automatically by Visual Studio when it is informed by the licenses.licx file in your project that licensed controls and components are used in your project. Licenses.licx file will be discussed later in this technote.

The steps required to embed a runtime license into your executable are described in the ASComm.NET Help system.

Help> Redistribution> Full Development License section

If you have performed the steps in the Help system and are still receiving runtime errors follow these troubleshooting steps:

 

TROUBLESHOOTING STEPS

Note: your version may vary from the version number shown in the steps below.

VERIFY DEVELOPMENT LICENSE ACTIVATION STATUS

On your development PC, ensure that ASComm.NET License Manager shows Licensed (Full Development) for the Channels used by your application.

License Manager

Note: Applications built using Single Computer licenses are not deployable to other PCs without additional Single Computer license purchases and license activation steps on target PC.

 

VERIFY PROJECT REFERENCE

In your Visual Studio project, ensure that your application is referencing ASComm.NET Full Development Edition, not ASComm.NET Trial Edition. Also, ensure that 'Copy Local' is set to True.

Setting 'Copy Local' = True will cause the referenced version of ASComm.NET to be copied to your project's output directory (bin/release, bin/debug, etc.).

Correct - Full Development Edition

Full Development Edition

Incorrect - Trial Edition

Trial Edition

 

VERIFY CORRECT DLL DISTRIBUTION

In Windows Explorer, ensure that the ASComm.NET file (AutomatedSolutions.ASComm.dll) properties in your project's output directory (bin/release, bin/debug, etc.) indicates the Full Development Edition, not the Trial Edition.

If the Trial Edition is in your project's output directory, step 2 of this technote was not performed correctly.

Correct - Full Development Edition   Incorrect - Trial Edition
Full Development Edition   Trial Edition

 

VERIFY LICENSES.LICX FILE, ENTRIES AND PROPERTIES

  1. Licenses.licx file must be located in your project's root folder.

  2. Included

    If not, copy the licenses.licx file from the ASComm.NET installation folder to your project's root folder.

    Installation folder for ASComm.NET version 3.10 is "C:\Program Files\Automated Solutions\ASComm.NET 3.10\".

     

  3. Licenses.licx must be added to your project using Solution Explorer and show up as an included file

  4. To check to see if licenses.licx has been added to your project, go to Project menu and enable 'Show All Files'

    If licenses.licx exists in your project, it should now show up. If not, add to your project using Add> Existing Item, then browse to the file.

    Included files show up in Solution Explorer with a solid outline; excluded files show up with a serrated outline.

    If licenses.licx shows up in your project but has a serrated outline, right click on licenses.licx and select 'Include in Project'

    Correct - Included   Incorrect - Excluded
    Included   Excluded

     

  5. Licenses.licx file assembly version must match your ASComm.NET assembly version.

  6. Refer to the Help system Embedded Runtime License topic for complete details

    Assembly Version

    The version number in licenses.licx entries must match the ASComm.NET Assembly Version number that your project is referencing.

    ASComm.NET is strongly named, which means that the Assembly Version number is included in Visual Studio references to ASComm.NET. Assembly Version is the only critical number in strong naming, File Version, Informational Version, etc., are for informational purposes only.

    The Assembly Version format is <major version>.<minor version>.<build number>.<revision>

    Automated Solutions changes only the Major and Minor Version numbers when we increment the assembly version.

    For ASComm.NET version 3.1:

    AutomatedSolutions.Win.Comm.AB.Logix.Net.Channel, AutomatedSolutions.ASComm, Version=3.1.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

    For ASComm.NET version 3.10:

    AutomatedSolutions.Win.Comm.AB.Logix.Net.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

     

  7. Licenses.licx file must have one entry for each driver used by your application.

  8. Refer to the Help system Embedded Runtime License topic for complete details

    Channel Entries

    The licenses.licx file must contain an entry for each Channel type that is used by your application.

    For ASComm.NET assembly version 3.10:

    AutomatedSolutions.Win.Comm.AB.Legacy.Net.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

    AutomatedSolutions.Win.Comm.AB.Logix.Net.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

    AutomatedSolutions.Win.Comm.GE.SRTP.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

    AutomatedSolutions.Win.Comm.MB.Master.Net.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

    AutomatedSolutions.Win.Comm.MB.Master.Serial.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

    AutomatedSolutions.Win.Comm.SI.S7.Net.Channel, AutomatedSolutions.ASComm, Version=3.10.0.0, Culture=neutral, PublicKeyToken=67272fe3f372de

     

  9. License.licx file properties should match these settings.

    • Build Action = Embedded Resource
    • Copy to Output Directory = Do Not Copy

     

    Included

     

VERIFY LICENSE STEPS AT EXE LEVEL

Follow these instructions if you are wrapping ASComm.NET in your own DLL that will then be used by another project.

  1. In addition to adding the ASComm.NET reference to your DLL project, ensure that ASComm.NET is referenced in the primary output assembly's (top level) project.
  2. Licenses.licx file must be located in the root folder of your primary output assembly's (top level) project.