Didstopia / PDFReader

A .NET Standard library for reading PDF files.
MIT License
1 stars 0 forks source link

.NET version issue with PDFSharp dependency #9

Closed Dids closed 7 years ago

Dids commented 7 years ago

The following error is shown in VS4Mac when including PDFReader in a .NET standard app/librar:

Error CS1703: Multiple assemblies with equivalent identity have been imported: '/Users/dids/.nuget/packages/didstopia.pdfreader/1.0.0-beta1/lib/netstandard2.0/System.ComponentModel.dll' and '/Users/dids/.nuget/packages/microsoft.netcore.app/2.0.0-preview1-002111-00/ref/netcoreapp2.0/System.ComponentModel.dll'. Remove one of the duplicate references.

PDFReader itself is also showing a warning:

/Users/dids/Work/Xamarin/PDFReader/Didstopia.PDFReader/Didstopia.PDFReader.csproj : warning NU1701: Package 'PDFsharp 1.50.4000-beta3b' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETStandard,Version=v2.0'. This may cause compatibility problems. [/Users/dids/Work/Xamarin/PDFReader/Didstopia.PDFReader.sln]

We'll probably just need to roll our own NuGet of PDFSharp, rewriting it as a .NET Standard 2.0 package, which isn't too bad, but does take a few hours/days.

Dids commented 7 years ago

Fixed in https://github.com/Didstopia/PDFReader/commit/51aaf3380e719fb0fa3591bb5fe7675c3d1ed420.