Embedding the C# Licensing Runtime

If you have purchased the Embeddable C# Licensing Runtime for DeployLX Licensing you can embed it directly into your C# projects instead of referencing the DeployLX.Licensing.v5.dll

Included Source Files

DeployLX.Licensing.v5.cs Implements the licensing runtime. Replaces a need to reference the DeployLX.Licensing.v5.dll.
DeployLX.Licensing.Nlm.v5.cs Implements runtime support for network licensing. Replaces a need to reference the DeployLX.Licensing.Nlm.v5.dll.

Embedding the Runtime

Warning: It is critical to follow these instructions in the exact order. Do not take any shortcuts or combine steps.
To Embed the C# Licensing Runtime
  1. Download the latest version found in your account downloads and extract to your desktop.
  2. Add DeployLX.Licensing.v5.resx  from source download.
  3. Add DeployLX.Licensing.v5.cs from source download.
  4. For network licensing, add DeployLX.Licensing.Nlm.v5.resx  from source download.
  5. For network licensing, add DeployLX.Licensing.Nlm.v5.cs from source download.
  6. For Visual Studio 2010 .NET 4.0 projects, change the project target to .NET Framework. 4.0
    1. Select the project in the solution explorer.
    2. Select Project | Properties.
    3. Select the Application tab.
    4. Change the Target to .NET Framework 4.0.
  7. Add references to the following system assemblies
    • System
    • System.Configuration
    • System.Drawing
    • System.Runtime.Remoting
    • System.Web
    • System.Web.Services
    • System.Windows.Forms
    • System.Xml
    For Network Licensing add these additional references
    • System.ServiceModel
    • System.Runtime.Serialization
  8. Enable unsafe code
    1. With your project selected, select Project | Properties.
    2. Select the Build tab.
    3. Select Allow unsafe code
    4. Repeat for all build configurations.

Adding Protection

You must run the Project Wizard on your assembly that includes source code tocreate keys and add them to your project. When running the project wizard makesure the Target project will embed licensing source code directly option is selected.

Encoding Your Assembly

Remember, that when you embed the C# runtime you must use one of the authorized assembly encoders to process the resulting assembly before distributing your product to any 3rd party.

View a list of authorized encoders

    Published : Mar 07, 2010
    Updated : Feb 25, 2013
    Views : 10678
    • deploylx