ERROR: The type or namespace name 'DeployLX' could not be found

When compiling a project recently protected with DeployLX you may receive the following error. 

error CS0246: The type or namespace name 'DeployLX' could not be found (are you missing a using directive or an assembly reference?)

Cause

The DeployLX Licensing runtime requires the full .NET framework profile and the protected project targets the client profile. Following the error, you might also receive the following warning.

warning MSB3268: The primary reference "DeployLX.Licensing.v5.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5,Profile=Client". To resolve this problem, either remove the reference "DeployLX.Licensing.v5.dll" or retarget your application to a framework version which contains "System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

The warning basically states that you need to change your protected assembly to use the full .NET framework profile.

Solution

The solution is to change your projects settings so that you target the full .NET framework.

Visual Basic
To target the full .NET Framework profile
  1. Select Project | Properties...
  2. Select the Compile tab.
  3. Scroll to the bottom and select Advanced Compile Options...
  4. Change the Target framework to .NET Framework 3.5 or later. 
  5. Ensure that Target framework is not a 'Client Profile'.
C#
To target the full .NET Framework profile
  1. Select Project | Properties...
  2. Select the Application tab.
  3. Change the Target framework to .NET Framework 3.5 or later. 
  4. Ensure that Target framework is not a 'Client Profile'.

DeployLX 5.x

DeployLX 5.x add support for the .NET client framework. Simply remove the existing DeployLX.Licensing.v5 reference from your project and add a reference to the client profile version from [ProgramFiles]\XHEO INC\DeployLX\v5.x\Redistributable\.NET 3.5 Client Profile\Any CPU.

Published : Aug 24, 2011
Updated : Jan 11, 2012
Views : 1555
  • licensing
  • deploylx

Downloads

Folder