Search found 2 matches

by Xor
Thu 13 Jan 2022 09:09
Forum: dotConnect for PostgreSQL
Topic: Embedding license when building on Azure DevOps
Replies: 2
Views: 24430

Re: Embedding license when building on Azure DevOps

Thanks for the info, Shalex.

I actually made it to work with the precompiled dll.licenses and exe.licenses files. The reason of error I was getting was the following:
  • I placed *.licenses files in the same place as *.licx, i.e. the Properties folder.
  • When the project *.licx is compiled, lc.exe adds an embedded resource with name of "AssemblyName.(dll|exe).licenses".
  • But, if add the already pre-compiled *.licenses to the Properties folder and make it the embedded resource, it will get name "AssemblyName.Properties.(dll|exe).licenses".
  • Not sure why Devart didn't get it (the other licensed component I use were getting license correctly).
The fix was to match the new resource name with the original. The easiest way is to add a logical name to the embedded resource and explicitly name it in the compiled assembly like that:

Code: Select all

<EmbeddedResource Include="Properties\exe.licenses">
	<LogicalName>AssemblyName.exe.licenses</LogicalName>
</EmbeddedLicense>
After that everything is working as it should.
by Xor
Mon 20 Dec 2021 12:38
Forum: dotConnect for PostgreSQL
Topic: Embedding license when building on Azure DevOps
Replies: 2
Views: 24430

Embedding license when building on Azure DevOps

Hello,

I'm trying to build my application on Azure DevOps hosted agents and seem to have some issues with embedding the license. Since build agent are created each time build runs it can't use license.licx file and license installed on a system.
Instead, I compiled license on dev machine, got compiled *.licenses files and embedded them instead.
This should work as that *.licenses files are one actually embedded even when you use license.licx file, and it works for the other licensed component in the project, but not for dotConnect for Postgres. Compiled app fails with error "License not found".

I wonder is there a way to compile project with proper license in this manner, I mean without installing license on build agents? Where can I find any info about it?

Thanks in advance.