WindowsSideBySide

From HerzbubeWiki
Jump to navigation Jump to search

Overview


Isolated application

  • "Self-describing" application with a manifest
  • Fully Isolated = Application uses only side-by-side assemblies, or only private assemblies
  • Is described by a manifest
  • The application manifest contains, among other things:
    • Dependencies to assemblies (if necessary including versions)


Side-by-side assembly

  • Collection of resources that is described by a manifest
  • The collection typically is a DLL
  • Possibl resources: DLLs, classes, COM server, type libraries, interfaces
  • A Side-by-side Assembly has a unique identity; one part of the identity is the version
  • The manifest of a side-by-side assembly contains, among other things:
    • The identity of an assembly (the assemblyIdentity element)
    • Which files are part of the assembly
    • Dependencies to other assemblies
    • Information about binding and COM activation that traditionally is stored in the Windows Registry (e.g. COM classes, interfaces, type libraries)


Manifest

  • XML file that describes a side-by-side assembly or an isolated application
  • The manifest of a shared assembly is stored in the system's WinSxS folder
  • The manifest of a private assembly is either embedded into the DLL as a resource, or stored in the application folder
  • The manifest of an application is either embedded into the EXE as a resource, or stored in the application folder


Search order of assemblies


Activation context


Assembly version

  • major.minor.build.revision
  • A change to major and/or minor means the assembly is not backwards compatible


Debugging

To solve SxS problems the tool "sxstrace" can be sued. Reference: http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx.

Howto:

  • Run cmd.exe as administrator
  • Start the trace
sxstrace trace -logfile:c:\sxstrace.etl
  • Start the program
  • Stop the trace by pressing the <ENTER> key in the console
  • Analyse the binary trace file:
sxstrace parse -logfile:c:\sxstrace.etl -outfile:c:\sxstrace.txt
  • The text file now contains the trace information in human readable format