This example demonstrates how to enable the DevExpress CrossPlatform Drawing Engine in an ASP.NET Core application to preview, print, or export DevExpress XtraReports.
The commands required to configure the host operating system environment for the DevExpress CrossPlatform Drawing Engine are included in the docker file.
-
At startup call the DevExpress.Printing.CrossPlatform.CustomEngineHelper.RegisterCustomDrawingEngine method to register the DevExpress CrossPlatform Drawing Engine in the application.
-
The
DockerfileFile
property in the project file specifies the name of the docker file to use in the project. Edit the project file manually to change the default Debian docker file to docker files for Alpine or Ubuntu. For more information on the build properties in a project file, review the following help topic: Container Tools build properties. -
The Debian docker file.
-
The Alpine docker file.
-
The Ubuntu docker file.
-
The Amazon Linux docker file.
You can run the app on Windows platform, Windows Subsystem for Linux or Docker. Select a platform from the debug drop-down in the toolbar, and start debugging the app.
Run the application from the dotnet CLI on Windows, Linux and MacOS with the dotnet run
command.
To run the Docker contaier from the command line, build the Docker image. You should pass the DevExpress NuGet source URL as a secret to restore NuGet packages. Review the BuildKit documentation for more information.
Windows
set DX_NUGET=https://nuget.devexpress.com/some-nuget-token/api docker build -t reporting-app --secret id=dxnuget,env=DX_NUGET . docker run -p 8080:80 reporting-app:latest
Linux
export DX_NUGET=https://nuget.devexpress.com/some-nuget-token/api DOCKER_BUILDKIT=1 docker build -t reporting-app --secret id=dxnuget,env=DX_NUGET . docker run -p 8080:80 reporting-app:latest
The application page is available at the following URL: http://localhost:8080/.