In one of my classes, I am using the Syncfusion.Pdf package installed
using the nuget-package installer, to create pdf documents using the
Syncfusion.Pdf.PdfDocument class. This was working, until I also
installed the Syncfusion.PdfViewer.WPF package in order to use the
PdfViewer control in my WPF View. After installing the PdfViewer package
with nuget, I get the following error:
CS0433 The
"PdfDocument" type is present in "Syncfusion.Pdf.Base, Version=21.2.5.0,
Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" and
"Syncfusion.Pdf.Portable, Version=21.2.5.0, Culture=neutral,
PublicKeyToken=3d67ed1f87d44c89".
I do not understand why this is
happening, because I am not referencing the PdfViewer.WPF namespace in
my pdfcreator class, so their should not be any conflicts when using the
Syncfusion.Pdf.PdfDocument
class.
Just as a side note, this error disappeared when I
uninstalled the PdfViewer.WPF package from nuget, and then reappeared as
soon as I reinstalled the PdfViewer.WPF package.
[EDIT] I went through the individual dependencies and discovered that the PdfViewer is installing one or more duplicates of existing ones that already came with the Syncfusion.Pdf.Net.Core package. I am now attempting to manually add the dlls to my project.