Distribution licensing issue: assembly that contains embedded license cannot be used with application

Distribution licensing issue: assembly that contains embedded license cannot be used with application

Postby w.scr » Mon 13 Jun 2016 14:15

We're getting an OracleException with the following message whenever we run our software on a non-development system:
Assembly that contains embedded dotConnect for Oracle license cannot be used with this application: <applicationname>
Please correct license information.

I followed the instructions at https://www.devart.com/dotconnect/db2/docs/Licensing.html.
Our library contains a licenses.licx file with the following content - the build action is set to Embedded Resource (we're using Visual Studio 2015):
Devart.Data.Oracle.OracleConnection, Devart.Data.Oracle, Version=8.4.225

There's also a licenses.config file in the same folder that contains our application name (including .exe extension).

That should be all that's required, and I can verify that the license code is indeed embedded into our library, but for some reason the licenses.config information is not taken into account.

I removed and reinstalled dotConnect, made sure that the Devart.Data.dll and Devart.Data.Oracle.dll versions match those that are in the GAC, I tried with and without the version number in licenses.licx, I tried adding these references to the main executable project (together with a licenses.licx file), I tried with and without .exe extension in the licenses.config file, and so on, but nothing so far has resolved the problem.

What could cause this problem - and more importantly, how can this be fixed?
w.scr
 
Posts: 2
Joined: Mon 13 Jun 2016 13:50

Re: Distribution licensing issue: assembly that contains embedded license cannot be used with application

Postby Pinturiccio » Wed 15 Jun 2016 13:46

Visual Studio 2015 passes parameters to lc.exe differently than older Visual Studio versions. We have supported Visual Studio 2015 Release Candidate in dotConnect for Oracle 8.4.422. Starting from this version, we have taken these differences into account and correctly process parameters, passed by Visual Studio 2015. For more information, please refer to https://www.devart.com/dotconnect/oracle/revision_history.html

With Visual Studio 2015, you need to use dotConnect for Oracle 8.4.422 or higher. However, you can use Visual Studio 2015 with dotConnect for Oracle 8.4.225. In this case you have to compile license resources manually.

The license resource can be compiled in the following way:
1) Create a text file named licenses.licx and enter the following text inside the licenses.licx file:
Devart.Data.Oracle.OracleConnection, Devart.Data.Oracle

2) Generate the license resource file using the following command line:
"%Compiler Path%\lc.exe /target:MyApplication.exe /complist:licenses.licx /i:"%Assembly Path%\Devart.Data.Oracle.dll"
Where:

- %Compiler Path% is the path to the appropriate lc.exe file (for example, C:\Program Files\Microsoft.NET\SDK\v2.0\Bin);
- MyApplication.exe is the name of your target executable file. If you want to compile a license resource for a class library project, specify MyApplication.dll instead of MyApplication.exe, where MyApplication.dll is the name of the class library.
- licenses.licx is your licenses.licx file. Place licenses.config file in the same folder as the licenses.licx file for a class library project;
- %Assembly Path% is the Devart.Data.Oracle.dll assembly location.

3) The License compiler will generate the 'MyApplication.exe.licenses' ('MyApplication.dll.licenses' for class library project) resource file;

4) Add this file to your project as an embedded resource.

For more information, please refer to https://www.devart.com/dotconnect/oracle/docs/Licensing.html#compile
Pinturiccio
Devart Team
 
Posts: 2024
Joined: Wed 02 Nov 2011 09:44

Re: Distribution licensing issue: assembly that contains embedded license cannot be used with application

Postby w.scr » Thu 23 Jun 2016 14:48

Thanks, that solved the problem.
w.scr
 
Posts: 2
Joined: Mon 13 Jun 2016 13:50


Return to dotConnect for Oracle