This example demonstrates how to use the DevExpress.Drawing package based on the SkiaSharp library instead of the System.Drawing library 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 Drawing Engine are included in the docker file.
To restore NuGet packages while building a Docker image, you should pass the DevExpress NuGet feed URL as a secret as follows:
- Go to nuget.devexpress.com and copy your DevExpress NuGet feed URL.
- Paste the copied feed URL to the secrets.dev.yaml file located in the project.
You can run the app on the Windows platform, or the Windows Subsystem for Linux or Docker. If you want to launch the app with docker, select Docker from the Launch drop-down menu in the Visual Studio toolbar.
Run the application from the dotnet CLI on Windows, Linux, and MacOS with the following command:
dotnet run
To run the Docker container from the command line, build the Docker image:
Windows
cd ReportingWebApp
docker build -t reporting-app --secret id=dxnuget,source=secrets.dev.yaml .
docker run -p 8080:80 reporting-app:latest
Linux
cd ReportingWebApp
DOCKER_BUILDKIT=1 docker build -t reporting-app --secret id=dxnuget,source=secrets.dev.yaml .
docker run -p 8080:80 reporting-app:latest
The application page is available at the following URL: http://localhost:8080/.
Review the Docker documentation for more information: BuildKit documentation.
If your secrets.dev.yaml contains the byte order mark (BOM), you can get an error while restoring NuGet packages. To avoid this potential problem, make sure your secrets.dev.yaml encoding does not contain the BOM.
-
The file that contains your NuGet feed URL.
-
The
DockerfileFile
property in the project file specifies the name of the docker file to use in the project. Sample docker files for different operating systems are included in the project. You should edit the project file manually to replace the default Debian docker file with docker files for Alpine, Ubuntu or Amazon Linux. For more information on 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.
-
The OpenSuse docker file.
(you will be redirected to DevExpress.com to submit your response)