FAQ: Licensing and Deploying Builds of Finished Applications

Follow these instructions to test, build, and distribute apps using the CData single developer, royalty-free license.

Date Entered: 9/15/2014    Last Updated: 9/15/2014

License and distribute the CData ADO.NET provider as a run-time component in your application.

How do I License and Distribute the Provider for a Windows Application?

CData ADO.NET providers use the .Net Licensing Scheme. Follow the steps below to add the license to your project as an embedded resource.

  1. In Visual Studio, include the license file (Licenses.licx) in the project. Add Licenses.licx by clicking Add Existing Item on the Project menu. You can find Licenses.licx in the folder of a CData ADO.NET product demo.
  2. When you deploy your application, include the CData assemblies in the same directory as the executable.

Back to top

How Do I License and Distribute the Provider for a Web App?

Web Apps can be licensed by compiling App_Licenses.dll and deploying this assembly in the same folder as the executable and the CData assembly.

  1. To license your application, first add the Licenses.licx file to your project. Licenses.licx is located in the folder of one of the CData ADO.NET product demos.
  2. Right-click on Licenses.licx in the Solution Explorer, and select Build Runtime Licenses from the menu. This will create App_Licenses.dll.
  3. To distribute your application, copy App_Licenses.dll to your project. You will also need to copy the CData assembly and App_Licenses.dll into the same folder as your executable; for example, the Bin folder for Web apps.

Back to top

How do I License and Distribute the Provider for My Entity Framework Application?

Follow the steps below to license an application that uses the Entity Framework. For example, MVC and LightSwitch.

  1. Copy the required CData assemblies into the same folder as the executable. The assemblies for CData ADO.NET providers are located in the lib subfolder of the installation directory. For .NET 4.0, ensure that you use the DLLs, located in the 4.0 subfolder in the lib directory.

    All CData ADO.NET providers require the same assemblies. QuickBooks is used as an example below:

    • System.Data.CData.QuickBooks.dll
    • System.Data.CData.QuickBooks.Entities.dll

      Use System.Data.CData.Entities.EF6 if you are using Entity Framework 6.

  2. Add the provider key from Machine.config to the App.config or Web.config of your application or site. The Machine.config is located in the Config folder in the .NET Framework directory for your version of the .NET Framework. .NET 4.0 uses C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config and .NET 2.0 uses C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG. The App.config or Web.config should resemble the entry using QuickBooks below:

    .... ....
  3. To license your product, add Licenses.licx, located in the folder of a provider demo, to your build. Right-click Licenses.licx, and select Build Runtime Licenses. This generates App_Licenses.dll. For Windows Forms applications, App_Licenses.dll is created when you build the executable.
  4. To deploy a Windows Forms application, App_Licenses.dll and the CData assemblies must both be in the same folder as the executable.

    To deploy a Web app, the CData assembly and App_Licenses.dll must be located in the bin folder. Applications that use the Entity Framework require both the CData and CData Entities assemblies. Ensure that you copy the .NET 4.0 assemblies, located in the 4.0 subfolder of the lib folder where the provider is installed.

Back to top

How Do I Build App_Licenses.dll?

In most scenarios, you can build App_Licenses.dll by following the procedures above — add Licenses.licx to your project and right-click the license to select Build Runtime Licenses.

If the Build Runtime Licenses option does not work for you, you can build App_Licenses.dll in a separate project. Create a new project, adding licenses.licx and the CData assemblies, such as System.Data.CData.QuickBooks.dll and System.Data.CData.QuickBooks.Entities.dll. Building the project creates App_Licenses.dll. This assembly must be distributed in the same folder as your executable and the CData assemblies.

How Do I Transfer a License?

  1. Complete the transfer process here:
    http://www.cdata.com/lic/transfer/
  2. Fully uninstall the provider from your machine.
  3. Install the provider on the machine you wish to transfer the license to. You will need to get the Node Id for both machines. Download the Node Id tool here:
    http://www.cdata.com/lic/nodeid.exe

Back to top

Why am I Receiving This Error?

  • "Could not load file or assembly 'System.Data.CData.QuickBooks, Version=3.0.0.0, Culture=neutral, PublicKeyToken=cdc168f89cffe9cf' or one of its dependencies. The system cannot find the file specified."

    This error means that the CData assembly, such as System.Data.CData.QuickBooks.dll, has not been added to the project as a reference. You can find the assembly in the Lib folder where you installed the provider.

  • "Could not load file or assembly 'System.Data.CData.SharePoint, Version=2.0.4703.0, Culture=neutral, PublicKeyToken=cdc168f89cffe9cf' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference."

    This error notifies you that the Machine.config entry does not match the assembly that you are using. To resolve this error, you need to copy several settings in the Machine.config file for the version of .NET Framework that you are using into your Web.config or App.config file. Please see the relevant procedure for your application type.


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

 
 
ダウンロード