logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
bav  
#1 Posted : Thursday, March 16, 2023 5:01:57 PM(UTC)
bav

Rank: Newbie

Groups: Registered
Joined: 1/11/2023(UTC)
Posts: 7
United States

This is a tricky one. I have a .net framework 4.7.2 WPF project that references a .net standard 2.0 project.
They both have a reference to the Pdfium.Net.SDK package.
The WPF project use the PDF renderer.
The .net standard project is a shared project that does some low level PDF editing.
When the application is built, the WPF project takes precedence and copies over \.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.dll, which is version 10.75.42.472.
Without any modification, there is a runtime error that version 10.75.42.2020 cannot be found.
If I add a binding redirect (oldVersion="0.0.0.0-10.75.42.2020" newVersion="10.75.42.472") to the app.config of the WPF project, it will work around the warnings.

I had to do this with the previous version as well and I'm just wondering if I'm doing something wrong here. I know it's not the ideal setup but we haven't had time to convert the UI projects to .net core (.Net) yet.

Here is an example of the build warnings:
Found conflicts between different versions of "Patagames.Pdf" that could not be resolved.
There was a conflict between "Patagames.Pdf, Version=10.75.42.472, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf" and "Patagames.Pdf, Version=10.75.42.2020, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf".
"Patagames.Pdf, Version=10.75.42.472, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf" was chosen because it was primary and "Patagames.Pdf, Version=10.75.42.2020, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf" was not.
References which depend on "Patagames.Pdf, Version=10.75.42.472, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf" [C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.dll].
C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.dll
Project file item includes which caused reference "C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.dll".
C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.dll
References which depend on "Patagames.Pdf, Version=10.75.42.2020, Culture=neutral, PublicKeyToken=60fd6cf9b15941cf" [].
.....IO.Core\bin\Test\netstandard2.0\IO.Core.dll
Project file item includes which caused reference ".....IO.Core\bin\Test\netstandard2.0\IO.Core.dll".
.....IO.Core\bin\Test\netstandard2.0\IO.Core.dll
.....Azure.Core\bin\Test\netstandard2.0\Azure.Core.dll
.....BusinessLogic\bin\Test\BusinessLogic.dll
.....Settings\bin\Test\Settings.dll
.....ViewModels\bin\Debug\ViewModels.dll
.....WebApi.WebClient\bin\Debug\WebApi.Client.dll
C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.WinForms.dll
Project file item includes which caused reference "C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.WinForms.dll".
C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.WinForms.dll
C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.Wpf.dll
Project file item includes which caused reference "C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.Wpf.dll".
C:\Users\bryan\.nuget\packages\pdfium.net.sdk\4.80.2704\lib\net472\Patagames.Pdf.Wpf.dll
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.