WinSxS: How to accept dependency on a specific version of gdiplus.dll?

I need to add a dependency on a specific version of GDIPlus. This is the version of GDI + that I want:

alt text

I want to be sure that I am using this version for a specific compatibility reason.

I added the assembly manifest to my executable, determining the dependency on the GdiPlus version :

<dependency>
   <dependentAssembly>
      <assemblyIdentity 
            type="win32" name="Microsoft.Windows.GdiPlus" 
            pubicKeyToken="6595b64144ccf1df" 
            version="5.1.3102.2180" processorArchitecture="x86"
            language="*" />
   </dependentAssembly>
</dependency>

Unless I run my application, the fusion bootloader for Windows provides me with a different version of gdiplus.dll from the "Side-by-Side" folder that I see in Process Explorer:

alt text

This gives me version 5.02.6002.18005 , not 5.1.3102.2180 .

So the question is: how do I get the dependency on a particular version of the Windows DLL?

+3
1

"", , , , , , 5.1.3102.2180 5.02.6002.18005

, , . , , , .

, , GDI + 5.1 , 5.1. 5.2 GDI +, .

, 5.1, 5.2... , .

, yourapp.exe.config - , GDI +, dll, thedll.dll.2.config

, bindingRedirect. , , . . .

.config , . - ( , winsxs, , ).

<configuration>
  <windows>
    <assemblyBinding xmlns=...>
      <dependentAssembly name="GdiPlus...>
        <bindingRedirect oldVersion="5.1.x.x" newVersion="5.1.x.x"/>

"oldVersion", .

oldVersion="5.0.0.0-5.3.0.0"

, GdiPlus .

+2

Source: https://habr.com/ru/post/1716934/


All Articles