# Hydra 6 .Net plugin. Devops build license issue

**URL:** https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907
**Category:** Hydra
**Tags:** net
**Created:** [May 1, 2020, 12:55pm UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907 "2020-05-01T12:55:58Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Stephenson\_Martin](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@Stephenson\_Martin](https://talk.remobjects.com/u/Stephenson_Martin)
#### Post date: [May 1, 2020, 12:55pm UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/1 "2020-05-01T12:55:58Z")

</div>

Hi.

I have a WPF Hydra 6 plugin which we need to build through an Azure DevOps build pipeline. I am trying to avoid installing Hydra on the build server to avoid maintenance when upgrading versions.

As you don’t seem to have a nuget package I created my own. The build process now completes on DevOps, but running the plugin gives a license error.

“The application was built with a trial version of RemObjects Hydra”.

Can I add the license to prevent this ?

Thanks  
Martin.

 ![image](https://talk.remobjects.com/uploads/default/original/2X/a/af3d07a0ce5cb852ed80045b8443d1cbfe38fe45.png)

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [May 4, 2020, 8:33am UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/2 "2020-05-04T08:33:45Z")

</div>

Does Azure DevOps allow to deploy secret files to custom locations? You need to deploy your licenses file to `%APPDATA%\RemObjects Software\Licenses`

---

<div class="post-metadata">

### Author: ![Stephenson\_Martin](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@Stephenson\_Martin](https://talk.remobjects.com/u/Stephenson_Martin)
#### Post date: [May 4, 2020, 9:02am UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/3 "2020-05-04T09:02:45Z")

</div>

Thank you.  
Short term I’ll manully copy the license to our dev client environment. We will be using an installer to deploy outside dev. Does the license need updating for every build ?

Where is the best place to pick up the license file from - is it the properties of the built plugin?

Thanks again.  
Martin

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [May 4, 2020, 9:26am UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/4 "2020-05-04T09:26:43Z")

</div>

> [@Stephenson\_Martin](#):
>
> Short term I’ll manully copy the license to our dev client environment. We will be using an installer to deploy outside dev. Does the license need updating for every build ?

Please note that the license file is used only at build time and should never be deployed with the compiled product. Compiled assembly contains a special resource signed using license info.

> [@Stephenson\_Martin](#):
>
> Where is the best place to pick up the license file from - is it the properties of the built plugin?

License file can be downloaded here: [Login | Portal | RemObjects Software](https://www.remobjects.com/portal/) section “License File Download”

I’ll log an issue to investigate is it possible to simplify deployment of license file for such automated build environments as Azure DevOps

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [May 4, 2020, 9:26am UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/5 "2020-05-04T09:26:47Z")

</div>

Thanks, logged as [bugs://84254](https://www.remobjects.com/portal/bugs/?id=84254)

---

<div class="post-metadata">

### Author: ![Stephenson\_Martin](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@Stephenson\_Martin](https://talk.remobjects.com/u/Stephenson_Martin)
#### Post date: [May 4, 2020, 9:31am UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/6 "2020-05-04T09:31:53Z")

</div>

> [@antonk](#):
>
> Does Azure DevOps allow to deploy secret files to custom locations? You need to deploy your licenses file to `%APPDATA%\RemObjects Software\Licenses`

Ahhh, so it’s a build time issue not having the license to compile into the assembly - not a deployment issue where the license needs to exist on the client.

So I need to copy the license file onto `%APPDATA%\RemObjects Software\Licenses` on the build environment, not the client.

Thank you for clearing that up.

I got a little confused. I thought it was a similar issue to this

> [@Can't build a .NET Core project using dotnet publish when using RO/DA class libraries](https://talk.remobjects.com/t/cant-build-a-net-core-project-using-dotnet-publish-when-using-ro-da-class-libraries/19383/2):
>
> For the record - it is not just any RO/DA project. It is any .NET Core project that uses the licensing.licx licensing model Before you start rewriting stuff (note thast HttpAPI won’t provide you easy access to DA LINQ) let’s consider some other options (see PM)

---

<div class="post-metadata">

### Author: ![Stephenson\_Martin](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/4bbf92/32.png) [@Stephenson\_Martin](https://talk.remobjects.com/u/Stephenson_Martin)
#### Post date: [May 5, 2020, 5:09pm UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/7 "2020-05-05T17:09:44Z")

</div>

> [@antonk](#):
>
> %APPDATA%\RemObjects Software\Licenses

All working on DevOps build pipeline now, thank you.

Can you tell me does the license compiled into the executable expire and if so what happens at that point. I’ve been asked to document this in the proof of concept project report.

Our customer can’t always schedule regular releases. For example during this Coronavirus period all software releases have been halted. It would be a major issue if the license expired during this time and the system failed due to license expiring.

Thanks  
Martin.

---

<div class="post-metadata">

### Author: ![antonk](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/a5b964/32.png) [@antonk](https://talk.remobjects.com/u/antonk)
#### Post date: [May 6, 2020, 10:11am UTC](https://talk.remobjects.com/t/hydra-6-net-plugin-devops-build-license-issue/21907/8 "2020-05-06T10:11:53Z")

</div>

Hello

In short words - if the application was built with valid developer license then it will not expire.

You can easily check this by running your app in a virtual machine with network disabled and date set to f.e. 1st Jan of 2040.

* * *

A longer explanation:  
Here

- **developer license** is the license file downloaded from [https://remobjects.com](https://remobjects.com) (the one put into `%APPDATA%\RemObjects Software\Licenses`)
- **compiled license** - resource contained in the compiled application

How it works (short and not always accurate in all the details. Refer to MSDN for full and detailed explanation of the .NET licensing system):

1. .NET build process founds `licenses.licx` file in the project
2. .NET license compiler is run over that file
3. For each type mentioned in `licenses.licx` license compiler loads its license generator
4. License generator generates some resource. Here is the place where **developer license** is checked
5. Generated resource is the **compiled license**
6. Resource is added to the compiled assembly

At runtime when the application is executed the **compiled license** validity is checked.

Our **compiled license** license check code does **NOT** check for expiration date of the **developer license**
