Side-by-side assembly
Encyclopedia
Side-by-side technology is a standard for executable files
Executable
In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...

 in Microsoft Windows XP and later versions that attempts to reduce DLL hell
DLL hell
In computing, DLL Hell is a term for the complications that arise when working with dynamic link libraries used with Microsoft Windows operating systems, particularly legacy 16-bit editions which all run in a single memory space....

. Side-by-side technology is also known as WinSxS or SxS. Executables that include an SxS manifest are designated SxS assemblies.

DLL hell
DLL hell
In computing, DLL Hell is a term for the complications that arise when working with dynamic link libraries used with Microsoft Windows operating systems, particularly legacy 16-bit editions which all run in a single memory space....

 designates a group of problems that arise from the use of dynamic-link libraries
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...

 in Microsoft Windows. Problems include version conflicts, missing DLLs, duplicate DLLs, and incorrect or missing registration. In SxS, Windows stores multiple versions of a DLL in the WinSXS subdirectory of the Windows directory, and loads them on demand. This reduces dependency problems for applications that include an SxS manifest.

Microsoft Visual C++ 2005 and 2008 employ SxS with all C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 runtime libraries
Runtime library
In computer programming, a runtime library is a special program library used by a compiler, to implement functions built into a programming language, during the execution of a computer program...

. However, runtime libraries in Visual C++ 2010 no longer use this technology; instead, they include the version number of a DLL in its file name, which means that different versions of one DLL will technically be completely different DLLs now.

Operation

An application that employs SxS must have a manifest. Manifests are typically a section embedded in the application's executable file but may also be an external file. When the operating system loads the application and detects the presence of a manifest, the operating system DLL loader is directed to the version of the DLL corresponding to that listed in the manifest. If there is no manifest, the DLL loader loads a default version of all DLL dependencies.

On Windows Vista and later, application start failures due to SxS misconfiguration can be diagnosed using sxstrace.exe.

Manifest format

The manifest is internally represented as XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

. The URN
Uniform Resource Name
A uniform resource name is a uniform resource identifier that uses the urn scheme and does not imply availability of the identified resource. Both URNs and URLs are URIs, and a particular URI may be a name and a locator at the same time.The functional requirements for uniform resource names are...

 associated with SxS manifests is "urn:schemas-microsoft-com:asm.v1".

Several other recent Microsoft technologies such as ClickOnce
ClickOnce
ClickOnce is a Microsoft technology that enables the user to install and run a Windows application by clicking a link in a web page. ClickOnce is a component of Microsoft .NET Framework 2.0 and later, supports deploying applications made with Windows Forms or Windows Presentation Foundation...

 employ the same manifest format.

Example manifest

The following is an example of a manifest for an application that depends on a C runtime DLL.


















Advantages

  • For applications that have been built with SxS, multiple applications may coexist that depend on different versions of the same DLL. This is in contrast to non-SxS DLL environments where an original DLL in a shared system folder may be overwritten by the subsequent installation of another program that depends on a different version of the same DLL.

  • The XML formatting of the manifest is human-legible and thus makes it easier for developers to determine the dependencies of an application and their versions.

Disadvantages

  • Only supported on Windows XP and later
  • Considerably higher disk space consumption. The winsxs directory typically starts at several gigabytes in size and continues to grow as applications are installed. Further, there is currently no way to significantly reduce the size of the winsxs directory.

See also

  • DLL hell
    DLL hell
    In computing, DLL Hell is a term for the complications that arise when working with dynamic link libraries used with Microsoft Windows operating systems, particularly legacy 16-bit editions which all run in a single memory space....

  • Stability and performance improvements in Windows XP

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK