Info only: how to get (and solve) a WPF DLL version problem
Posted: Fri Nov 10, 2023 11:53 am
Below a problem & how it was solved, some of you may find this useful. This has nothing to do with X# (it is a C# project even) but it seems a Visual Studio issue.
I use the Syncfusion Essential Wpf library for a PDF utility program. I found some issues in the PDFViewer and Syncfusion acknowledges and fixed those and eventually advised to install the weekly updates via NuGet. I was reluctant to do so because NuGet often meant trouble in the past, and this time again. The installation worked fine but I now had to add a license key in my code (which was not necessary for the regular installations from an exe) and that didn't work. Instead of finding out why, I decided for now to wait for a regular update and remove the NuGet installations via the Package manager in the VS Tools menu which worked. I removed the references and assigned the previous DLL's. But now my program wouldn't start; only in debugging mode I saw the message was Can't load Syncfusion.Shared.Wpf version 23.1460.42.0, which was the version supposed to be removed. But why?
I suspected the GAC (Storing something in the GAC cause comparable trouble as using NuGet) and de-installed syncfusionessentialwpf.exe, checked to remove GAC settings, reinstalled without copying anything into the GAC, copied all the DLL's I used, deleted and recreated the reference. However the problem remained.
Overnight Syncfusion support handed me the solution. In the App.config, I found these lines as they suspected:
This was still pointing to the "42.0" removed version and apparently caused the problem. Removing this section solved my problem.
Dick
I use the Syncfusion Essential Wpf library for a PDF utility program. I found some issues in the PDFViewer and Syncfusion acknowledges and fixed those and eventually advised to install the weekly updates via NuGet. I was reluctant to do so because NuGet often meant trouble in the past, and this time again. The installation worked fine but I now had to add a license key in my code (which was not necessary for the regular installations from an exe) and that didn't work. Instead of finding out why, I decided for now to wait for a regular update and remove the NuGet installations via the Package manager in the VS Tools menu which worked. I removed the references and assigned the previous DLL's. But now my program wouldn't start; only in debugging mode I saw the message was Can't load Syncfusion.Shared.Wpf version 23.1460.42.0, which was the version supposed to be removed. But why?
I suspected the GAC (Storing something in the GAC cause comparable trouble as using NuGet) and de-installed syncfusionessentialwpf.exe, checked to remove GAC settings, reinstalled without copying anything into the GAC, copied all the DLL's I used, deleted and recreated the reference. However the problem remained.
Overnight Syncfusion support handed me the solution. In the App.config, I found these lines as they suspected:
Code: Select all
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Syncfusion.Shared.Wpf" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-23.1460.42.0" newVersion="23.1460.42.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Dick