This topic explains how to build and publish the EvoPdf Next ASP.NET demo applications which can be downloaded as a ZIP file from the EvoPdf website. It should be used after completing the Getting Started guide for Windows and the corresponding Getting Started guide for Linux. The topic includes instructions for the Windows, Linux, macOS and Cross-Platform demos, covering both x64 and ARM64 architectures.
The Windows demo is located in the Windows folder. It provides two projects: one for Windows x64 and one for Windows ARM64.
The Windows x64 demo application can be deployed to Windows servers, Azure App Service Windows, Azure Functions Windows or Docker Windows containers. The ARM64 build is intended for Windows ARM64 servers and desktops.
The Windows x64 demo project file is EvoPdf_Next_AspNetDemo_Windows.csproj and it uses the EvoPdf.Next.Windows package from NuGet, which contains .NET Standard 2.0 assemblies and the Windows x64 runtimes for all EvoPdf Next components. There are separate versions for .NET 8 and .NET 10; the target framework can be changed in the project file as described in the Change Target Framework section below.
Build the application:
dotnet build -c Release -r win-x64 EvoPdf_Next_AspNetDemo_Windows.csprojPublish the application:
dotnet publish -c Release -r win-x64 -o publish/windows-x64 EvoPdf_Next_AspNetDemo_Windows.csprojRun the published application. Change into the publish folder first so that the application can locate its content files:
cd publish/windows-x64
dotnet EvoPdf_Next_AspNetDemo_Windows.dllThe Windows ARM64 demo project file is EvoPdf_Next_AspNetDemo_Windows.Arm64.csproj and it uses the EvoPdf.Next.Windows.Arm64 package from NuGet, which contains .NET Standard 2.0 assemblies and the Windows ARM64 runtimes for all EvoPdf Next components.
Build the application:
dotnet build -c Release -r win-arm64 EvoPdf_Next_AspNetDemo_Windows.Arm64.csprojPublish the application:
dotnet publish -c Release -r win-arm64 -o publish/windows-arm64 EvoPdf_Next_AspNetDemo_Windows.Arm64.csprojRun the published application. Change into the publish folder first so that the application can locate its content files:
cd publish/windows-arm64
dotnet EvoPdf_Next_AspNetDemo_Windows.Arm64.dllAs an example, a project that targets .NET 8.0 can be upgraded to target .NET 10.0 by simply changing the TargetFramework element in the .csproj project file from net8.0 to net10.0.
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>You can add the --self-contained true option to the publish command to create a self-contained deployment that does not require the .NET runtime to be installed on the target machine.
The application will start and listen on the configured port (for example http://localhost:5000) and you can access it from a web browser running on the same machine or remotely if the network is properly configured.
On Windows, no additional configuration is normally required. For platform-specific deployment details, consult the Getting Started on Windows guide as well as the specific guides for Publishing to Azure App Service Windows, Publishing to Azure Functions Windows or Publishing to Docker on Windows.
The Linux demo is located in the Linux folder. It provides two projects: one for Linux x64 and one for Linux ARM64.
The Linux x64 demo application can be deployed to Linux servers, Azure App Service Linux, Azure Functions Linux or Docker Linux containers. The ARM64 build targets Linux ARM64 servers and Linux ARM64 Docker containers.
The Linux x64 demo project file is EvoPdf_Next_AspNetDemo_Linux.csproj and it uses the EvoPdf.Next.Linux package from NuGet, which contains .NET Standard 2.0 assemblies and the Linux x64 runtimes for all EvoPdf Next components. There are separate versions for .NET 8 and .NET 10; the target framework can be changed in the project file as described in the Change Target Framework section below.
Build the application:
dotnet build -c Release -r linux-x64 EvoPdf_Next_AspNetDemo_Linux.csprojPublish the application:
dotnet publish -c Release -r linux-x64 -o publish/linux-x64 EvoPdf_Next_AspNetDemo_Linux.csprojRun the published application. Change into the publish folder first so that the application can locate its content files:
cd publish/linux-x64
dotnet EvoPdf_Next_AspNetDemo_Linux.dllThe Linux ARM64 demo project file is EvoPdf_Next_AspNetDemo_Linux.Arm64.csproj and it uses the EvoPdf.Next.Linux.Arm64 package from NuGet, which contains .NET Standard 2.0 assemblies and the Linux ARM64 runtimes for all EvoPdf Next components.
Build the application:
dotnet build -c Release -r linux-arm64 EvoPdf_Next_AspNetDemo_Linux.Arm64.csprojPublish the application:
dotnet publish -c Release -r linux-arm64 -o publish/linux-arm64 EvoPdf_Next_AspNetDemo_Linux.Arm64.csprojRun the published application. Change into the publish folder first so that the application can locate its content files:
cd publish/linux-arm64
dotnet EvoPdf_Next_AspNetDemo_Linux.Arm64.dllAs an example, a project that targets .NET 8.0 can be upgraded to target .NET 10.0 by simply changing the TargetFramework element in the .csproj project file from net8.0 to net10.0.
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>You can add the --self-contained true option to the publish command to create a self-contained deployment that does not require the .NET runtime to be installed on the target machine.
The application will start and listen on the configured port (for example http://localhost:5000) and you can access it from a web browser running on the same machine or remotely if the network is properly configured.
On Linux, additional packages must be installed before running HTML to PDF conversion. For platform-specific deployment details and the list of required system dependencies, consult the Getting Started on Linux guide as well as the specific guides for Publishing to Azure App Service Linux, Publishing to Azure Functions Linux or Publishing to Docker on Linux.
The macOS demo is located in the MacOS folder. macOS is supported on Apple Silicon (ARM64) only, so a single project is provided.
The macOS demo project file is EvoPdf_Next_AspNetDemo_MacOS.csproj and it uses the EvoPdf.Next.MacOS package from NuGet, which contains .NET Standard 2.0 assemblies and the macOS ARM64 runtimes for all EvoPdf Next components. There are separate versions for .NET 8 and .NET 10; the target framework can be changed in the project file as described below.
Build the application:
dotnet build -c Release -r osx-arm64 EvoPdf_Next_AspNetDemo_MacOS.csprojPublish the application:
dotnet publish -c Release -r osx-arm64 -o publish/macos EvoPdf_Next_AspNetDemo_MacOS.csprojRun the published application. Change into the publish folder first so that the application can locate its content files:
cd publish/macos
dotnet EvoPdf_Next_AspNetDemo_MacOS.dllAs an example, a project that targets .NET 8.0 can be upgraded to target .NET 10.0 by simply changing the TargetFramework element in the .csproj project file from net8.0 to net10.0.
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>You can add the --self-contained true option to the publish command to create a self-contained deployment that does not require the .NET runtime to be installed on the target machine.
The application will start and listen on the configured port (for example http://localhost:5000) and you can access it from a web browser running on the same machine.
macOS deployment targets version 12.0 (Monterey) or later on Apple Silicon.
The Cross-Platform demo is located in the MultiPlatform folder. It shows how to target several platforms from a single project by combining EvoPdf Next NuGet packages. Two projects are provided: one for x64 and one for ARM64.
The x64 demo application can be deployed to Windows and Linux servers, Azure App Service, Azure Functions or Docker containers for both Windows and Linux. The ARM64 build targets Windows and Linux ARM64 servers, including Linux ARM64 Docker containers.
The x64 project file is EvoPdf_Next_AspNetDemo_MultiPlatform.csproj and it uses the EvoPdf.Next metapackage, which in turn references the EvoPdf.Next.Windows and EvoPdf.Next.Linux packages for the Windows x64 and Linux x64 runtimes. There are separate versions for .NET 8 and .NET 10; the target framework can be changed in the project file as described below.
Build the portable version:
dotnet build -c Release EvoPdf_Next_AspNetDemo_MultiPlatform.csprojPublish the portable version, which runs on any supported platform where the .NET runtime is installed:
dotnet publish -c Release -o publish/portable EvoPdf_Next_AspNetDemo_MultiPlatform.csprojRun the portable build. Change into the publish folder first so that the application can locate its content files:
cd publish/portable
dotnet EvoPdf_Next_AspNetDemo_MultiPlatform.dllAlternatively, publish for a specific runtime. For Windows x64:
dotnet publish -c Release -r win-x64 -o publish/windows-x64 EvoPdf_Next_AspNetDemo_MultiPlatform.csprojFor Linux x64:
dotnet publish -c Release -r linux-x64 -o publish/linux-x64 EvoPdf_Next_AspNetDemo_MultiPlatform.csprojThe ARM64 project file is EvoPdf_Next_AspNetDemo_MultiPlatform.Arm64.csproj and it references the EvoPdf.Next.Windows.Arm64 and EvoPdf.Next.Linux.Arm64 packages for the Windows ARM64 and Linux ARM64 runtimes.
Build the portable version:
dotnet build -c Release EvoPdf_Next_AspNetDemo_MultiPlatform.Arm64.csprojPublish for Windows ARM64:
dotnet publish -c Release -r win-arm64 -o publish/windows-arm64 EvoPdf_Next_AspNetDemo_MultiPlatform.Arm64.csprojRun it. Change into the publish folder first so that the application can locate its content files:
cd publish/windows-arm64
dotnet EvoPdf_Next_AspNetDemo_MultiPlatform.Arm64.dllPublish for Linux ARM64:
dotnet publish -c Release -r linux-arm64 -o publish/linux-arm64 EvoPdf_Next_AspNetDemo_MultiPlatform.Arm64.csprojRun it. Change into the publish folder first so that the application can locate its content files:
cd publish/linux-arm64
dotnet EvoPdf_Next_AspNetDemo_MultiPlatform.Arm64.dllTo also target macOS ARM64, add the EvoPdf.Next.MacOS package to either the x64 or the ARM64 project. The single-platform packages can be referenced in any combination to target exactly the platforms and architectures your application needs.
As an example, a project that targets .NET 8.0 can be upgraded to target .NET 10.0 by simply changing the TargetFramework element in the .csproj project file from net8.0 to net10.0.
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>Building for all platforms supported by the metapackage may bring many files into the output folder. During development it is often useful to restrict build output to a single OS by setting the RuntimeIdentifier property in the project file.
To limit to Windows x64:
<PropertyGroup>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>To limit to Linux x64:
<PropertyGroup>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup>The EvoPdf Next libraries automatically detect the operating system at runtime and use the appropriate files for the platform.
On Linux, additional packages must be installed before running HTML to PDF conversion. For platform-specific deployment details, consult the Getting Started on Windows and Getting Started on Linux guides.
You can now continue with the platform-specific deployment guides such as Publishing to Azure App Service Windows or Publishing to Azure App Service Linux for Azure App Service, Publishing to Azure Functions Windows or Publishing to Azure Functions Linux for Azure Functions, Publishing to Docker on Windows or Publishing to Docker on Linux for Docker.