How to build AR V9 on a azure dev ops

Posted by: david.kethel on 15 July 2020, 5:01 pm EST

    • Post Options:
    • Link

    Posted 15 July 2020, 5:01 pm EST

    Hi

    I have a .net solution that is using AR V9. I am licensed on my development machine.

    However, when I got to build the solution in azure dev-ops I get the following error.

    WSMproperty\Properties\licenses.licx(2,0): Error LC0004: Exception occurred creating type ‘GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v9, Version=9.5.7812.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff’ System.ComponentModel.LicenseException: License cannot be confirmed. Error code: 01-001

    How do I go about building my solution in a hosted build in azure dev ops.

    Thanks

    Dave

  • Posted 16 July 2020, 12:26 am EST

    Hello,

    You can use the “ApplicationLicenseGenerator” to create the license dll so that you can build your solution in Azure app.

    Please refer to the topic “To license ActiveReports when you cannot compile the calling application or the calling application is COM” in the following link:

    https://help.grapecity.com/activereports/webhelp/AR9/index.html#arHOWLicensingActiveReports.html

    Hope it helps.

    Thanks,

    Mohit

  • Posted 16 July 2020, 12:33 pm EST

    Also, Is this post relevant?

    https://www.grapecity.com/forums/ar-dev/azure-devops-pipelines-hos#what-about-ar9-will-this-w

    I do see some {target}.{ext}.licenses files in my obj/release folder?

  • Posted 16 July 2020, 2:23 pm EST

    Thanks Mohit,

    I don’t understand. Can you walk me through it?

    Steps I have taken.

    1. Install ActiveReports-v9.5.7812.0.msi on my machine and Activate it with my Licence.
    2. In my solution. I add references through the Add references → Assemblies → framework.
    3. My solution builds fine and everything is licensed.
    4. Now as we’re doing azure dev ops hosted builds Active reports is not installed on the Azure machine that is doing the build. So I copied the active Report dlls from my bin/release folder, put them in a separate folder in my code base and changed my projects over to reference the copied dll’s not the ones in C:\Program Files (x86)\Common Files\grapecite. Cause I’m assuming that the Active Report dlls out of my bin/release folder are licensed.
    5. I also have licence.licx files in my projects that look like

    GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports.v9

    GrapeCity.ActiveReports.Viewer.Win.Viewer, GrapeCity.ActiveReports.Viewer.Win.v9

    But my azure dev ops hosted build through the error above. Am I on the right track?

  • Posted 16 July 2020, 2:45 pm EST

    Hello,

    Please do the following steps:

    1: From the …\Common Files\GrapeCity\ActiveReports 9 folder, run the ApplicationLicenseGenerator.exe. If you are using a Windows 7 or higher machine, right click the executable file and select Run As Administrator.

    2:Click the Browse button and select the compiled dll/Exe that requires licensing.

    3:In the Assembly description field, enter the description for the assembly that you are licensing. You can later view this description by right-clicking the licensed assembly.

    4:Click the Generate button

    5:Distribute the generated file .GrapeCity.Licenses.dll along with the application.

    Have you tried above steps? if you have the " .GrapeCity.Licenses.dll " in your application, you build the application on Azure dev ops.

    Also, delete the “Licenses.licx” file from the application.

    Also, Is this post relevant?

    This steps are never tested with the AR9. I suggest you to use the above-mentioed approach only.

    Please let me know if you still have some doubt.

    Thanks,

    Mohit

  • Posted 16 July 2020, 3:22 pm EST

    Thanks Mohit.

    So do I run the “ApplicationLicenseGenerator.exe” on my application dll’s or on the grape city DLL’s. ?

  • Posted 16 July 2020, 3:23 pm EST

    Hello,

    do I run the “ApplicationLicenseGenerator.exe” on my application dll’s or on the grape city DLL’s. ?

    On application dll or exe if you have executable.

    Thanks,

    mohit

  • Posted 16 July 2020, 3:39 pm EST

    Thanks Mohit,

    I’ll give that a crack.

    The codebase I’m working on, came to me as the result of an acquisition, and the original developer is long gone.

    I noticed that there is a settings file with the following in it.

    <add key=“ActiveReports 9 License” value="bSYNGtwoWAVEpS6o1qn…

    Does that mean anything to you? Is that a valid way to license Active reports? Should I remove it?

    Dave

  • Posted 19 July 2020, 9:20 am EST

    Thanks Mohit,

    Running the ApplicationLicenseGenerator.exe worked and everything is building in azure dev ops now.

    Thanks for all your help.

    Dave

  • Posted 22 August 2021, 10:56 am EST - Updated 30 September 2022, 7:30 am EST

    Hi Dave and/or Mohit,

    I guess I’m still confused after reading though this thread and have am attempting to also do what Dave was doing. Like Dave, I recently inherited a project which uses ActiveReports and my task was to migrate the previous build process (just using scripts on a Windows 10 system) to instead use an Azure Devops pipeline. My GrapeCity ActiveReports dll’s are already in source control and my project references those dll’s rather than a local path on the c:\ drive where ActiveReports would be installed. Like Dave I receive a license error during the compile task in my Azure Devops pipeline and while I was able to get around this by adding a step to empty out the licenses.licx files, I’'ll still receive a licensing issue with the final compiled application due to not having been compiled with licensed ActiveReports dll’s

    I’m still confused as to whether I run the ApplicationLicenseGenerator on the ActiveReports dll’s which my project requires as assemblies and then once the .GrapeCity.Licenses.dll’s are generated for each assembly would I then add these license dll’s to my source control, alongside the Grapecity.ActiveReports dll’s I’ve already committed to our source control?

    One of the replies stated to run the ApplicationLicenseGenerator against my compiled application dll/exe’s but I’m not understanding the order of operations. My Azure Devops build pipeline is what compiles and creates my application dll/exe’s so how can I run the ApplicationLicenseGenerator against these when theoretically they have yet to be compiled by the pipeline?

    Thanks for clarifying!

  • Posted 22 August 2021, 10:28 pm EST

    Hello,

    how can I run the ApplicationLicenseGenerator against these when theoretically they have yet to be compiled by the pipeline

    You need to compile your application on the licensed machine first so that they can build on the Azure Pipeline.

    Hope it helps.

    Thanks,

    Mohit

  • Posted 23 August 2021, 9:32 am EST - Updated 30 September 2022, 7:30 am EST

    Thanks Mohit. I think it’s finally starting to click and make sense in my brain :slight_smile: So after running the ApplicationLicenseGenerator against my already compiled applications, would I then include the resulting " .GrapeCity.Licenses.dll " with my application? For example, would I want to commit this new ".GrapeCity.Licenses.dll " to my source control and in my application’s .vbproj file add a new reference to include " .GrapeCity.Licenses.dll "?

    Thanks for taking time to answer my questions. I have almost zero .net experience, which you can probably tell, besides also now having to figure out licensing for dependencies such as ActiveReports and certain things like this have been tough to figure out without many references online.

  • Posted 23 August 2021, 3:42 pm EST

    Hello,

    Yes, you need to include the generated dll in your project so that project will build on azure without an issue.

    Thanks,

    Mohit

  • Posted 24 August 2021, 12:44 am EST - Updated 30 September 2022, 7:30 am EST

    Thanks again! I’ll be putting this all in to place today, I appreciate your help.

  • Posted 13 March 2024, 10:31 pm EST

    Hello Team,

    I am currently working on a dotnet service project that utilizes AR7, and I am in the process of integrating it into our CI/CD pipeline on Azure DevOps. Our Build agent is an Azure Hosted agent.

    While I’ve achieved the desired behavior of the service in local environments and through manual deployment on the server, I’m encountering an issue when attempting to deploy it using the pipeline. Specifically, I’m encountering the following error:

    [License for the SectionReport cannot be found.]

    To address this, I’ve attempted several solutions mentioned:

    I included the [project].exe.grapecity.Licenses.dll generated by ApplicationLicenseGenerator.exe in the references, but unfortunately, this did not resolve the issue.

    Additionally, I’ve tried adding/removing the Licenses.Licx file within the /Lib/ folder, toggling its inclusion/exclusion in the project, yet this also did not gave the desired outcome.

    Despite these efforts, the issue persists. I would greatly appreciate any insights or suggestions you may have to help resolve this matter.

  • Posted 14 March 2024, 10:10 pm EST

    Hi Harshal,

    Could you please try using the ‘WebKeyGenerator.exe’ utility to generate a WebKey that you can embed into your project into the ‘Web.config’ file as:

    <configuration>
        <appSettings>
            <add key=" ActiveReports Developer 7 License" value="Generated Web Key" />
        </appSettings>
    </configuration>
    

    Note:

    • You can find the WebKeyGenerator.exe in the
      ....\Common files\ComponentOne\ActiveReports Developer 7
      folder.
    • If you see the message “Your computer is not currently licensed” in the Web Key Generator dialog, please license your machine.

    You can learn more about licensing a Medium Trust/Azure project for ActiveReports 7 here: ActiveReports 7 - License Your ActiveReports (under To create the Web Key with the Web Key Generator utility).

    Regards,

    Anand

  • Posted 16 March 2024, 5:16 am EST

    Hi anand,

    Thans for the prompt response, it worked out with the [project].exe.grapecity.Licenses.dll file. I suspect there was some sync/references issue previously.

  • Posted 17 March 2024, 3:04 pm EST

    Hi Harshal,

    Thanks for sharing the resolution here. We’re glad to know that your issue has been resolved!

    Regards,

    Anand

Need extra support?

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

Learn More

Forum Channels