« März 2006 | Hauptseite | Mai 2006 »

07.04.06

DLL Hell

Wieder was Technisches zwischendurch... Microsoft hat die unter Windows schon immer nervige DLL hell auf ein neues Level gebracht: dependent side-by-side assemblies. Eigentlich ein ganz interessanter Ansatz, mit dem Anwendungen spezifizieren können, welche Version einer Bibliothek sie benötigen. Leider ging das hier in einem konkreten Beispiel gehörig schief: Eine Applikation wollte eine mit Visual Studio 2005 Express Edition gebaute DLL verwenden. Beim Laden erscheint dann allerdings eine Fehlermeldung, dass MSVCR80D.DLL (bzw. MSVCR80.DLL für Release-Versionen) nicht gefunden werden kann. Wagt man es, die genannten DLLs aus dem SxS-Verzeichnis umzukopieren, erhält man den Fehler R6034. Die einzig vernünftige Lösung ist, eine MeinProgramm.exe.manifest-Datei anzulegen, mit folgendem Inhalt:

Some more technical content in-between... Microsoft has brought the well-known and well-hated DLL hell to a new level: dependent side-by-side assemblies. It is actually an interesting way to let applications specify the versions of libraries that they need. However, that went rather wrong with a concrete application I was dealing with: Our application wants to use a DLL built using Visual Studio 2005 Express Edition. When loading the DLL, a message appears that MSVCR80D.DLL (MSVCR80.DLL for release versions) cannot be found. When copying the DLLs from the SxS directory into the Windows directory, you get error R6034. The only solution I found is to create a file MyApplication.exe.manifest, with the following contents:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

Verfasst von crenz um 10:57 | Kommentare (2) | TrackBack