Unable to build App_Licenses.dll in ASP.NET projects.

When attempting to build the App_Licenses.dll file in Visual Studio 2008 or 2010, an error may be returned that Visual Studio could not transform the licenses file into a binary resource.

Date Entered: 10/07/2014    Last Updated: 10/07/2014

Microsoft Visual Studio 2008 and Visual Studio 2010 will sometimes return an error similar to the following when you attempt to build the App_Licenses.dll:

C:\Program Files\nsoftware\IPWorks SSL V9 .NET Edition\demos -
webform\aspx2-cs\licenses.licx: Could not transform licenses file into a
binary resource. (3) error LC0004 : Exception occurred creating type
'nsoftware.IPWorksSSL.Certmgr, nsoftware.IPWorksSSLWeb,
Version=9.0.5391.0, Culture=neutral, PublicKeyToken=cdc168f89cffe9cf
System.IO.FileNotFoundException: Could not load file or assembly
'nsoftware.IPWorksSSL.System, Version=, Culture=neutral,
PublicKeyToken=cdc168f89cffe9cf' or one of its dependencies. The
system cannot find the file specified.
File name: 'nsoftware.IPWorksSSL.System, Version=, Culture=neutral, PublicKeyToken=cdc168f89cffe9cf'
type, LicenseContext creationContext, Object[] args)
type, LicenseContext creationContext)
  at System.Tools.LicenseCompiler.GenerateLicenses(String
fileContents, String targetPE, ITypeResolutionService resolver,
DesignTimeLicenseContext ctx)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value

Typically this can be resolved by opening one of the pages in your web project in "Design" view before attempting to build the App_Licenses.dll.

You also may see the following error:

Could not transform licenses file into a binary resource. Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

This error indicates that there is an invalid entry in the licenses.licx file. Typically this occurs because a line in the licenses.licx file does not reference the *Web DLL. In this case the licenses.licx file should be reviewed to ensure that each DLL referenced is the *Web.dll as seen in the following example:

nsoftware.IPWorks.Http, nsoftware.IPWorksWeb

We appreciate your feedback.  If you have any questions, comments, or suggestions about this entry please contact our support team at kb@nsoftware.com.