License not found, tried solutions from FAQ

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

License not found, tried solutions from FAQ

Post by AlexanderPriem » Mon 04 Jul 2011 10:18

Hello,

I have just purchased the latest version of dotConnect for PostgreSQL, and now I am experiencing problems when trying to run an application built with it.

I am using Delphi Prism XE (Visual Studio Shell 10). It's very easy to recreate my problem :

* Create a new solution (Windows Forms Application), targeted for .Net 4
* Add a PgSqlConnection and a PgSqlCommand object to the form
* A licenses.licx file is addad automatically, so far so good
* When you go to Tools/PostgreSQL/License Information, You will see a warning : Unknown project type
* Add some code to create a connection to a database, does not matter which, since the executable will fail before attempting to actually connect
* When I run the exe on the development machine, it runs
* When I run the exe on another machine, I get an error 'License not found'

I placed the Devart.Data.dll and Devart.Data.PostgreSQL.dll files in the same folder as the exe file. I tried moving the licenses.licx file into the root of the project.

What is going wrong here ? Why can't the license wizard recognize the project type ?

AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

Post by AlexanderPriem » Mon 04 Jul 2011 11:05

Update :

If I add licenses.licx to the project under 'properties' (this is where the file is put by default), the error message upon running the exe on another machine says 'Assembly is not licensed'.

If I move the licenses.licx file to the root of the application tree, and rebuild, I get another error message when I run the app : 'License not found'.

If I move the licenses.licx file to the root of the entire solution, I get the 'License not found' message again when I run the app.

I am using the auto-generated licences.licx file (auto-generated when you place a connection on the form). I copied the two necessary DLL's to the exe-path, I even tried copying the licences.licx file there, though that should not be needed.

I also tried adding a licenses.config file, holding the name of the exe. Did not help either...

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 04 Jul 2011 12:18

Delphi Prism does not generate the correct license resource for dotConnect for PostgreSQL. We are investigating the issue.

Here are workarounds:

1. Development environment.
Please move your licenses.licx back to the Properties folder and remove the entry about dotConnect for PostgreSQL from it (but leave the information about other your vendors). Removing information about dotConnect for PosgreSQL from licenses.licx resolves the licensing issue in the development environment.

2. Deployment environment.
Here are two alternative ways to resolve the licensing issue in the deployment environment at the moment:
a) launch the dotConnect for PostgreSQL setup program on your target (deployment) machine and choose "Minimal installation". Note that according to End-User License Agreement this is the only install you can do on target machine. You must not distribute any other part of dotConnect for PostgreSQL.
b) generate and add the license resource to your application manually as it is described at http://www.devart.com/dotconnect/postgr ... ml#compile .

AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

Post by AlexanderPriem » Mon 04 Jul 2011 12:27

Hi Shalex,

I manually compiled a license file (.exe.licenses), but linking it into the exe does not work for me (probably because I am doing it wrong). Using PostgreSQLDirect.Net in combination with Delphi 2007, I did not need to do this, so I am inexperienced in manually doing this in Delphi Prism XE.

Can you give me detailed instructions for doing this ? My App is called XXX, default namespace also XXX.

Also, manually doing this in the future will not be a very elegant way for us to deploy production environments. Will you let me know when you have a more elegant (automatic) solution ?

Thanks in advance.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 04 Jul 2011 13:53

AlexanderPriem wrote:I manually compiled a license file (.exe.licenses). How do I add this as an "embedded resource file" ? Just add it to the project tree ?
You have to add the generated file into your project and set its Build Action property to Embedded Resource.
AlexanderPriem wrote:I will try the workaround, but this will not be a very elegant way for us to deploy production environments. Will you let me know if/when you have a more elegant solution ?
We are investigating the issue.

AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

Post by AlexanderPriem » Mon 04 Jul 2011 14:01

Hi Shalex,

Thanks, I was not aware of the 'Build Action' property. It's working now.

I hope there will be a permanent solution for this soon.

Thanks for the help so far, I appreciate your fast response !

AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

Post by AlexanderPriem » Wed 13 Jul 2011 06:38

Any progress on this issue ?

I'd really appreciate not having to compile and include the license manually in every single project we do...

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 13 Jul 2011 10:43

We are investigating the issue. We will post here about the results.

AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

Post by AlexanderPriem » Wed 10 Aug 2011 08:14

It's been over a month now since I reported this issue. Any progress on this ? Are you still investigating ? I am now manually licensing my apps, but consider this to be a temporary workaround.

I am running into a major problem manually compiling my license for a precompiled website. In this website, the pages are all derived from a master page. I need to precompile it for internal reasons.

What do I need to do to manually compile the license for a precompiled website using a master page? Do I only need to compile a license file for my master page dll ? I tried this, but when I add the manually compiled .dll.licenses file to my website, I cannot change its build action to 'embedded resource', because this context menu is not available.

I also tried the following : adding the licenses.licx file to the project using the PostgreSQL License Information menu item. After that, I right-clicked the licenses.licx file and executed 'Build runtime licenses', but I got an error message saying that the file C:\Documents and Settings\MyName\lc.exe could not be found. Seems it's looking in the wrong place, since that file should be in Program Files somewhere. Can I change the place it looks for this file somewhere and would that solve this ?

Or must I manually build runtime licenses somehow. If so, what to do in this case ?

Please fix this issue, so that the license gets compiled automatically, this is really frustrating...

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 12 Aug 2011 08:48

We are working on the licensing problem with Delphi Prism. We will notify you on the first available result.

Have you tried installing dotConnect for PostgreSQL with "Minimal" option in the deployment environment? Does this workaround work?

AlexanderPriem
Posts: 29
Joined: Fri 24 Feb 2006 09:54

Post by AlexanderPriem » Mon 22 Aug 2011 06:38

Yes, installing DotConnect (minimum installation) works for now, in our development environment.

For production environments, I would like to avoid this, however.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 30 Sep 2011 12:35

New build of dotConnect for PostgreSQL 5.50.228 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22166 .

This build includes the fix for the bug with licensing WinForms projects in Delphi Prism.

This express version of Visual Studio has a limitation for licensing WebSites: it does not include lc.exe. As a workaround, please copy
%ProgramFiles%\Microsoft SDKs\Windows\v7.0A\bin\lc.exe with lc.exe.config
to these two folders:
%Documents and Settings%\%CurrentUser%\
%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\

Post Reply