Install EJ2 PDF Viewer packages automatically based on the operating system

17 Feb 20221 minute to read

You can install the EJ2 PDF Viewer packages automatically based on the operating system by adding all the PDF Viewer NuGet packages in your csproj file. When building the project, the required NuGet will be installed based on the operating system.

<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux" Version="19.1.0.56" Condition="$([MSBuild]::IsOsPlatform('Linux'))"/>
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Osx" Version="19.1.0.56" Condition="$([MSBuild]::IsOsPlatform('OSX'))"/>
<PackageReference Include="Syncfusion.EJ2.PdfViewer.AspNet.Core.Windows" Version="19.1.0.56" Condition="$([MSBuild]::IsOsPlatform('Windows'))"/>