Search code examples
dllassembliesgdi+dependenciesfusion

How to ship gdiplus.dll but not have Windows use it?


i have an application that has a dependancy on gdiplus. i need the application to also run on Windows 2000.

i want to include GDIPlus in the application directory, so that Windows 2000 computers will function, but if the machine is Windows XP, Windows Vista, Windows 7, etc, i want it to use the version of GDIPlus that ships, and is updated, with Windows.

Not possible?


Solution

  • From http://msdn.microsoft.com/en-us/library/ms997620.aspx Try adding the following to your manifest :-

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
        <assemblyIdentity version="1.0.0.0" processorArchitecture="x86"
             name="Microsoft.Windows.mysampleapp" type="win32" />
        <description>Your app description here</description>
        <dependency>
            <dependentAssembly>
                <assemblyIdentity type="win32" name="Microsoft.Windows.GdiPlus"
                    version="1.0.0.0" processorArchitecture="x86"
                    publicKeyToken="6595b64144ccf1df" language="*" />
            </dependentAssembly>
        </dependency>
    </assembly>