VSTS Hosted Builds

Posted by: gjohnson on 9 February 2018, 10:35 am EST

    • Post Options:
    • Link

    Posted 9 February 2018, 10:35 am EST

    Hello,

    I want to take advantage of VSTS hosted builds - and not have an on-premise build server.

    What build steps/scripts are needed to run C1LicenseActivation.exe? It seems like it should be possible to silently run activation and deactivate within the build script.

    Thanks,

    Gary

  • Posted 9 February 2018, 10:55 am EST

    I was able to activate and deactivate using my account; but get compiler error. Do I need to have license registered with a service account or ??

    \Properties\licenses.licx(1,0): Error LC0004: Exception occurred creating type ‘C1.C1PrintDocument.C1PrintDocument, C1.C1PrintDocument, Version=1.0.20023.101, Culture=neutral, PublicKeyToken=1a6f4158ebe6d3b8’ System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

  • Posted 11 February 2018, 8:42 pm EST

    Hello,

    For activating license silently, one needs to use following script:

    “C:\Program Files (x86)\Common Files\ComponentOne Shared\C1LicenseActivation.exe” /as:serialkey /u:name /c:company

    So, the script you are using is right.

    However, upon checking up with your license key we observe that this license key has already been used maximum number of times allowed. So, before running this script, you need to first deactivate this key from one of the machines or use another license key [if you have another].

    Thanks,

    Mohit

  • Posted 12 February 2018, 2:57 am EST

    No error code given (must be 0=Unknown then??) when running the activation/deactivation steps.

    On an earlier attempt, the activation returned “5”, unfortunately non zero is considered a build error and continue on error was not set.

    How can I deactivate license? It’s licensed to my one dev machine.

    If licensed was previously assigned to another or did not deactivate on VSTS server, how can I reset it?

    And to ensure deactivation, the Activation and Build Solution steps must be set to continue on error.

    “0” would seem like a better return code when a command does what is expected.

  • Posted 12 February 2018, 6:01 pm EST

    Hi,

    For deactivating the machine you can use the script: “C:\Program Files (x86)\Common Files\ComponentOne Shared\C1LicenseActivation.exe” /d:serialkey

    Also this can be done silently using the following script:

    “C:\Program Files (x86)\Common Files\ComponentOne Shared\C1LicenseActivation.exe” /s:serialkey

    Here is a list of error codes returned during activating/deactivating:

    Exit codes:

    0 Unknown,

    1 Cancel,

    2 Bad Or Missing Parameters,

    3 Failed To Activate,

    4 Failed To Deactivate,

    5 License Activated,

    6 License Deactivated,

    7 Out Of Memory,

    8 Wininet Error,

    9 Activation Server Error,

    10 Invalid Serial Number,

    11 Activation Denied,

    12 Eval License Activated,

    13 Eval License Failed

    Also, regrading the error you faced \Properties\licenses.licx(1,0): Error LC0004: Exception occurred creating type ‘C1.C1PrintDocument.C1PrintDocument, C1.C1PrintDocument, Version=1.0.20023.101, Culture=neutral, PublicKeyToken=1a6f4158ebe6d3b8’ System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.: This is because the compile operation was probably performed on a non-licensed workstation, due to which a nag screen would be shown (a modal dialog).

    Could you please delete the *.licx file and rebuild the application and try again. A similar query was posted at the following post: https://social.msdn.microsoft.com/Forums/en-US/55e379f0-1e26-48c5-aac6-f0d973ba345f/team-build-error-with-3rd-party-component-provider?forum=tfsbuild

    Regards,

    Ruchir Agarwal

  • Posted 13 February 2018, 10:33 am EST

    (1) How can I deactivate a license on a VSTS (Microsoft hosted) server?

    This is not an on-premise machine and I * “do not”

    have access to c:\Program Files (x86)\Common Files.…

    I added the C1LicenseActivation.exe to my source code and run it on the Microsoft server. These seems to run in my scripts above but is problematic - A “5”, or License Activated is non-zero and a build error!!

    I have it on my local dev machine and builds just fine. I do * "not "

    want to setup an on premise build server.

    (2) Deleted licenses.licx file. Opened each form to regenerate the file (local build fails without it). Checked file into source control and launched VSTS build with the same results:

    2018-02-13T23:05:07.0233634Z ##[error]railRM\Properties\licenses.licx(4,0): Error LC0004: Exception occurred creating type ‘C1.C1PrintDocument.C1PrintDocument, C1.C1PrintDocument, Version=1.0.20023.101, Culture=neutral, PublicKeyToken=1a6f4158ebe6d3b8’ System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

    2018-02-13T23:05:07.0234269Z Properties\licenses.licx(4): error LC0004: Exception occurred creating type ‘C1.C1PrintDocument.C1PrintDocument, C1.C1PrintDocument, Version=1.0.20023.101, Culture=neutral, PublicKeyToken=1a6f4158ebe6d3b8’ System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. [D:\a\1\s\railRM\railRM.csproj]

    2018-02-13T23:05:07.1568172Z ##[error]railRM\Properties\licenses.licx(6,0): Error LC0004: Exception occurred creating type ‘C1.Win.C1PrintPreview.C1PrintPreview, C1.Win.C1PrintPreview, Version=1.0.20023.101, Culture=neutral, PublicKeyToken=3af768410ba0a64f’ System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

    2018-02-13T23:05:07.1568884Z Properties\licenses.licx(6): error LC0004: Exception occurred creating type ‘C1.Win.C1PrintPreview.C1PrintPreview, C1.Win.C1PrintPreview, Version=1.0.20023.101, Culture=neutral, PublicKeyToken=3af768410ba0a64f’ System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. [D:\a\1\s\railRM\railRM.csproj]

  • Posted 14 February 2018, 10:40 pm EST

    Gary,

    Please allow us to clarify.

    Since, you wanted to license your VSTS server(non-premise) machine, you were using script /as:serialkey /u:name /c:company to activate your server machine. But doing this, you were getting the error: Error LC0004: … … service application.

    For resolving this, we suggested you to make sure that the the license key you are using is still having activations left.

    Then you further informed us, while activating the server machine you received error code: 5, which we informed you means License Activated.

    So, what we want you to do is make sure that C1 is installed on your server machine and then run the activation script to license the server, it should return Error Code: 5

    I suggest you to refer following link where a similar issue has been answered: https://www.grapecity.com/en/forums/winforms-edition/licensing-issue-with-team-

    ~Ruchir Agarwal

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels