Licensing on CI servers

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
zszs
Posts: 3
Joined: Wed 20 Jan 2016 15:18

Licensing on CI servers

Post by zszs » Tue 26 Jan 2016 11:36

Hi,

I would like to know how to setup the license for dotConnect Professional if I want to run tests on a Team Build?
I tried to use the license wizard and I was able to create a licenses.licx file (as an embedded resource) and a licenses.config in the same folder (my "Specs" project root) although on the build server I still get the error:
"The provider did not return a ProviderManifestToken string. -> License not valid due to the problems with dotConnect for PostgreSQL installation."
My application consists 2 projects: Specs and Web.
  • Specs is a Class Library which uses Web and contains unit tests
  • Web is an ASP.NET MVC 5 application which references Devart dotConnect and uses Entity Framework 6
Both projects have licenses.licx and Specs has licenses.config too.

As far as I know from the docs (https://www.devart.com/dotconnect/db2/d ... nsing.html) you have to explicitly list the executables which are allowed to use your DLL in a file called licenses.config.
I tried it with the following list:

Code: Select all

MSTest.exe
MSBuild.exe
However it didn't work. Can you give me a hint how to solve this problem?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Licensing on CI servers

Post by Pinturiccio » Tue 26 Jan 2016 16:02

Probably dotConnect for PostgreSQL is not installed on your build server. The license resource must be built into your project every time when you build the project on the build server. dotConnect for PostgreSQL should be installed on the build server in order for license resource to be built into your project each time your project is built.

There are two possible solutions of the issue:
I. Install dotConnect for PostgreSQL with the "Minimal installation" check box selected to the build server. Our product is licensed for developers (not for a workstation or a server). A licensed developer is entitled to install and use our product on one or more computers (any number of computers), provided that it is used by the licensed developer alone, for the sole purposes of developing, testing, and deploying applications in accordance with our EULA.

You don't need a separate license for the build server. However, only the licensed developers can build applications that have direct references to Devart assemblies on the build server.

II. Compile the license resource. For this you need to perform the following actions:
1) Create a text file named licenses.licx and enter the following text inside the licenses.licx file:
Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql

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.PostgreSql.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.keys file in the same folder as the licenses.licx file for a class library project;
- %Assembly Path% is the Devart.Data.PostgreSql.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/postg ... ml#compile

Post Reply