Assembly binding redirect - fo-dicom/fo-dicom GitHub Wiki
After updating the fo-dicom package via NuGet in for example your web application, you may encounter a reflection type load exception where the loader error property of that exception indicates that:
Dicom.dll version 1.0.0.xx couldn't be found.
This is normally a consequence of failing assembly binding redirect. The assembly binding redirect should ideally be automatically performed during NuGet package installation; the NuGet package manager will normally run the Add-BindingRedirect command for this purpose.
If the assembly binding redirect does fail, you may either run this PowerShell command manually in the NuGet package manager console:
Get-Project –All | Add-BindingRedirect
which should update all *.config files in your VS solution with the correct redirect data, or you may add a section similar to the following to the the app.config (for desktop applications) or web.config (for web applications) file:
<dependentAssembly>
<assemblyIdentity name="Dicom" publicKeyToken="3a13f649e28eb09a" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
</dependentAssembly>
You can find more information on assembly binding redirect here: