ActiveReports 18 .NET Edition
DevOps / Deployment / Deploy Applications in Non-Windows Environment / Mac
In This Topic
    Mac
    In This Topic

    This page demonstrates how you can deploy your ActiveReports application on Mac locally.

    Prerequisites

    This tutorial uses the .Net 6 SDK to run and deploy the JSViewer_MVC_Core sample application locally. You can download the sample from our GitHub repository: https://github.com/activereports/WebSamples18/tree/main/JSViewer_MVC_Core

    We will also be using some sample reports to that can downloaded from the following link:

    https://github.com/activereports/WebSamples18/tree/main/JsViewerReports

    Requirements

    Build and Run

    1. Open the JSViewer_MVC_Core project in Visual Studio.
    2. Restore NuGet packages.
      1. For this expand the Dependencies option in the Solution Explorer.
      2. Right-click on the NuGet and select Restore in the context menu.
    3. Add JsViewerReport folder that we have downloaded previously in your project.
      1. Right-click on the Project in Solution Explorer.
      2. Click on Add > Add Existing Folder
      3. Select the JSViewerReports.
    4. Build and run the application.

    Publish the application

    Once you have confirmed that the application is running on your system, we are ready to Publish the application. Here are the steps to publish the macOS application.

    1.  In Visual Studio, right-click the project file of the JSViewer_MVC_Core and click Edit Project to edit the project file
    2. Now add a new Runtime Identifier to the file and save it, just as highlighted here:
      Copy Code
      <RuntimeIdentifiers>win10-x64;osx.10.12-x64</RuntimeIdentifiers>
      
       
      Add Runtime Identifiers
    3. Now right-click the project file again and click Publish>Publish to Folder…
    4. Set the publish location as “bin>release>6.0>publish” and click OK.

    Running the applications on macOS

    Now that we have published our application, we can run the application on macOS. The process is very similar as the process on Windows.
    Now to run the self-contained app on macOS:

    1. To run the JSViewer_MVC_Core application, we need to grant the executable permissions to run.
      1. First, Go to the bin/release/6.0 folder.
      2. Right-click on the Publish Folder and Select Services in the context menu and select New Terminal at Folder.
    2. Type in sudo chmod +x JSViewer_MVC_Core and hit enter.
    3. Type in the password of your admin account and hit enter to grant the executable permission to run.
    4. Now type in open JSViewer_MVC_Core and hit enter
    5. The app now runs in a new terminal window and the following message is displayed:

      Add Runtime Identifiers

    6. Now you can open the application on following URL in your browser: http://localhost:5000

    Add Runtime Identifiers