Component Licensing Issue

Ty's Avatar


03 Jul, 2018 05:25 PM

I am having difficulties licensing a 3rd party control as part of our build process. I am activating a license when the build starts and deactivating the license when the build completes. I am experiencing two issues. One: When msbuild goes to construct the dll with references to the 3rd party component, the build stops. I don't get an error message and the build does not continue.

I'm unable to determine what could stall the build. The license activation appears to have worked and returned a success code.

My next issue is that when this happens I have to manually cancel the build. It doesn't look like the the deactivation job in the on_finish is running. Is there a way to insure that the deactivation job always runs even on a manual cancel?

Here's our build script:

version: 1.0. {build}
image: Visual Studio 2017
secure: nFS2CE/1sZ5mLdduilbUUw==
secure: <key removed>
- '%LocalAppData%\NuGet\Cache -> **\packages.config'
clone_depth: 1
- ps: $fileContent = "-----BEGIN RSA PRIVATE KEY-----`n"
- ps: $fileContent += $env:PRIV_KEY.Replace(' ' , "`n" )
- ps: $fileContent += "`n-----END RSA PRIVATE KEY-----`n"
- ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent
- cmd: git submodule -q update --init --recursive
- ps: .\enterprise\test\assert-spaces_not_tabs.ps1
- cmd: enterprise\C1Activate.bat
- nuget restore -Verbosity quiet tw.core/TW.Core.sln
- nuget restore -Verbosity quiet enterprise/Connected.sln
- msbuild tw.core/TW.Core.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- msbuild enterprise/Connected.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- ps: $now = Get-Date
- ps: $nowUtc = [ System.TimeZoneInfo] : :ConvertTimeToUtc($now)
- ps: $tz = [ System.TimeZoneInfo] : :FindSystemTimeZoneById( "Mountain Standard Time" )
- ps: $nowDenver = [ System.TimeZoneInfo] : :ConvertTimeFromUtc($nowUtc, $tz)
- ps: $env:DESKTOP_VERSION = $nowDenver.ToString("yyyy.Mdd.Hmm")
- cd enterprise
- build-all.bat %DESKTOP_VERSION%
test: off
- path: .\enterprise\squirrelreleases\
- cmd: C1Deactivate.bat

Do I have any options to license a build machine and reuse the licensed image?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 03 Jul, 2018 07:39 PM

    Ilya Finkelshteyn's Avatar

    Hi Ty,

    Please RDP to build worker and see what happens. I would recommend to add non-blocking RDP at init stage. Maybe you will see some interactive window pops up and waiting for input. If not you can re-run command which stuck in RDP session and see how it goes. Note however that custom environment variables are not available in RDP session so you might need to re-creates some of them.

    You can de-activate the license in RDP too. However this might be not necessary. Build VM is transient and destroyed immediately after build. So not traces of your license stay anywhere.

    Regarding custom build image you maybe interested in private build cloud:


  2. Ilya Finkelshteyn closed this discussion on 02 Sep, 2018 09:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac