TFS Build of C1.Win components within Docker Container fails

Posted by: a.kuttruff on 21 January 2019, 7:21 am EST

    • Post Options:
    • Link

    Posted 21 January 2019, 7:21 am EST

    Hi,

    I setup a TFS Build Agent running within a Docker container and the build fails with following error message.

    Source\System\Hmd.System\Hmd.System\Properties\licenses.licx (1, 0)
    Source\System\Hmd.System\Hmd.System\Properties\licenses.licx(1,0): Error LC0004: Exception occurred creating type 'C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.6.20061.250, Culture=neutral, PublicKeyToken=79882d576c6336da' 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.[img]https://gccontent.blob.core.windows.net/forum-uploads/file-80ab169a-b574-4df8-aeab-7fc70cf263f6.png[/img]
    

    I attached a Screenshot of the TFS Build Configuration in which I register and un-register the C1 license on the fly.

    Any idea why the build fails?

    I validate the Build configuration against a TFS Build agent running within a “normal” HyperV VM. There it works fine. Is there something to do additionally within a docker container?

    I’m would be grateful for any help!

  • Posted 22 January 2019, 4:42 am EST

    Here the Error Message sepparately

    Source\System\Hmd.System\Hmd.System\Properties\licenses.licx (1, 0)

    Source\System\Hmd.System\Hmd.System\Properties\licenses.licx(1,0): Error LC0004: Exception occurred creating type ‘C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.6.20061.250, Culture=neutral, PublicKeyToken=79882d576c6336da’ 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 22 January 2019, 7:26 am EST

    Hello,

    Assuming that ComponentOne is installed on your server machine, we want you to check a few points:

    1. The C1 studio on the server should be licensed.
    2. Set the build action on your license.licx to None.
    3. Ensure that the specific dll is added under References i.e. C1.Win.C1FlexGrid.dll
    4. In your licenses.licx file, please remove the strong name, i.e. change
    C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.6.20061.250, Culture=neutral, PublicKeyToken=79882d576c6336da
    

    to

    C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2
    
    

    Rebuild the application and check if the issue persists. Though we have not checked the scenario on Docker Container, the error should be resolved with the above suggestions.

    Best Regards,

    Esha

  • Posted 23 January 2019, 9:50 am EST - Updated 4 October 2022, 1:39 am EST

    Hi,

    I made some further investigation and set up a TFS Build agent on a desktopless server2016 OS.

    During the build within lc.exe run (build output see below) there showed up a dialog “Warning. You have no printer installed which can be used for measuring layout of document…” (see screenshot) this could be the reason of the ERROR documented above. How can I disable this?

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\lc.exe /target:Hmd.System.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:c:_agent\1\s\Binaries\hmd\C1.C1Preview.2.dll /i:c:_agent\1\s\Binaries\hmd\C1.C1Zip.2.dll /i:c:_agent\1\s\Binaries\hmd\C1.Win.C1FlexGrid.2.dll /i:c:_agent\1\s\Binaries\hmd\C1.Win.C1Preview.2.dll /i:c:_agent\1\s\outputbinaries\Hmd.AuthLib.dll /i:c:_agent\1\s\outputbinaries\Hmd.Resources.dll /i:c:\nuget-cache\infragistics.shared.hmdcollection\10.1.20101.1\lib\net40\Infragistics2.Shared.v10.1.dll /i:c:\nuget-cache\infragistics.ultrawingrid.hmdcollection\10.1.20101.1\lib\net40\Infragistics2.Win.UltraWinGrid.v10.1.dll /i:c:\nuget-cache\infragistics.shared.hmdcollection\10.1.20101.1\lib\net40\Infragistics2.Win.v10.1.dll /i:c:_agent\1\s\Binaries\hmd\Microsoft.mshtml.dll /i:“C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll” /i:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework…

    Microsoft (R) .NET License Compiler

    [Microsoft .Net Framework, Version 4.6.1055.0]

    Copyright (C) Microsoft Corporation. All rights reserved.

    Processing complist ‘Properties\licenses.licx’…

  • Posted 23 January 2019, 11:02 am EST

    Hi,

    I solved the Problem with pumping this key to registry to suppress the dialog

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\ComponentOne\C1PrintDocument\DisableNoPrintersWarning]

    @=“1”

Need extra support?

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

Learn More

Forum Channels