TechTalkz.com Logo Ask the Experts!

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Windows XP

WinSxS directory - what is it about

Windows XP

 
 
Thread Tools Display Modes
Unread 16-06-2008, 07:12 AM   #1
occam
Guest
 
Posts: n/a
WinSxS directory - what is it about

I have just noticed this large(ish) directory under C:/Windows.

Is this new (i.e. post SP3) or has it always been there? What is its
function.

My searches show that it is an innovation for Vista. However, it is
definitely there in Win XP now, as a retro-fit?

The only consolation - its does not gobble up as much space as the 6GB
Vista equivalent.
 
Unread 16-06-2008, 11:12 AM   #2
John John (MVP)
Guest
 
Posts: n/a
Re: WinSxS directory - what is it about

I posted this to a Windows 2000 group a few weeks ago, it should answer
your questions.

Do you recall the term "DLL Hell"? The new(er) Side-by-Side Assembly
technology was introduced with Windows XP to help reduce or eliminate
DLL Hell. In short, Side-by-Side Assemblies permit the use of different
versions of the same shared system DLLs.

If you recall earlier Windows versions, like Windows 95, when you
installed an application you were (usually) warned if the installer
tried to replace a DLL from the system folder with an older version and
you were asked if you wanted to accept the change. Those with enough
Windows experience knew of the consequences of replacing DLLs in the
system folder with older ones, those who didn't have enough experience
quickly learned of the consequences of replacing DLLs with older versions!

With private DLLs there are few or no problems with DLL versioning as
private DLLs are placed in the program's folder. If you have different
versions or releases of the same program simply installing the different
versioned programs in different folder eliminates private DLL version
conflicts. Until Windows XP it wasn't so easy to use different versions
of shared system DLLs, that is what the new Side-by-Side assemblies
attempts to resolve.

This business of applications replacing system DLLs wily-nilly and the
DLL Hell that ensued was somewhat fixed with the Windows File Protection
feature (WFP) introduced with Windows 2000 but the shared DLL versioning
problem was not really fixed or properly addressed. Considering WFP and
the fact that WinSxS is a protected folder I am somewhat surprised that
you could "delete" this folder or manually delete/replace files in the
folder, on Windows XP and later WFP does not easily permit this.


Wikipedia's concise explanation of SxS is one of the better one:

"A common issue in previous versions of Windows was that users
frequently suffered from DLL hell, where more than one version of the
same Dynamically Linked Library (DLL) was installed on the computer. As
software relies on DLLs, using the wrong version could result in
non-functional applications, or worse. Windows XP solved this problem by
introducing side-by-side assemblies. The technology keeps multiple
versions of a DLL in the WinSxS folder and runs them on demand to the
appropriate application keeping applications isolated from each other
and not using common dependencies."

http://en.wikipedia.org/wiki/Feature...ide_assemblies


The rest of this post consists of excerpts and explanations from
Microsoft articles:

[Quote]

Side-by-Side Sharing

The workings of the new (XP) UI rely on a side-by-side sharing
requirements structure. As a solution for versioning problems and DLL
Hell, Microsoft strongly suggests that applications adopt a side-by-side
versioning strategy. As seen in the implementation of ComCtl version 6,
side-by-side components are the future of Windows development. This
section gives you an overview about what's new for side-by-side sharing
for Windows XP. For an in-depth look into this topic, see How To Build
and Service Isolated Applications and Side-by-Side Assemblies for
Windows XP. For background on side-by-side component sharing issues and
DLL redirection, see Implementing Side-by-Side Component Sharing in
Applications (Expanded).

With side-by-side components, multiple versions of a component are
installed simultaneously. An application is bound to the version of the
component with which it was designed and tested.

With Windows XP, there's an infrastructure to support assemblies and
isolated applications (both COM+ and Win32). A code change should not be
required to get at side-by-side assemblies from Win32 applications.
Applications can use the latest system assemblies without global impact.

In short, isolated applications are valuable because they are more
reliable. They are built and shipped with all needed components and are
not affected by changes that other applications make. Isolated
applications use a manifest, which is an XML file containing information
that self-describes an assembly or an application. All binding and
activation metadata, such as COM classes, interfaces, and type
libraries, is now stored in the manifest, rather than the registry.
There are two types of manifest files: applications manifests, which
describe isolated applications, and assembly manifests, which describe
individual assemblies.

An isolated application may use side-by-side assemblies. Assemblies are
the fundamental units of naming, binding, versioning, deployment, and
configuration. They come in two varieties, shared and private. A shared
assembly is available for use by multiple applications on the computer,
installed in the WinSxS folder in the Windows directory. A private
assembly is only visible to that application and is deployed within the
directory structure of the application.

There's another benefit for application developers in using side-by-side
sharing; your schedule can be much clearer. Your development schedules
are not affected by the release schedules of the components you use.

[end quote]

http://msdn.microsoft.com/en-us/library/ms997638.aspx


Windows 2000 doesn't understand diddly squat of these new Side-by-Side
Assemblies, here are more passages from Microsoft articles:

"If you install your application on a computer that is running Microsoft
Windows 2000 or earlier versions of Windows, do not ship the
side-by-side assembly in your application folder to those operating
systems. Instead, the side-by side assemblies should be used from the
system folder. If you install a shared component to the system folder as
part of your setup, make sure that you are not downgrading the version
if one is previously present."

http://msdn.microsoft.com/en-us/library/ms997620.aspx

and:

"On versions of Windows that do not support deployment of shared
side-by-side assemblies, such as Windows 98 and Windows 2000 Server, the
Visual C++ libraries are installed in the System32 folder and WinSxS
folder under the operating system root directory. This setup enables
running Visual C++ applications on these operating system versions
because they do not support manifest-based binding of applications to
dependent DLLs. On these operating systems, when an application is
loaded, the corresponding manifest file is ignored and the operating
systems searches for dependent DLLs using paths set in the current
running environment. However, on upgrading the operating system to a
version that support manifest-based binding, such as Windows XP, Windows
Server 2003, or Windows Vista, applications built with manifests start
using the DLLs installed in the WinSxS folder."

http://msdn.microsoft.com/en-us/libr...24(VS.80).aspx

John

occam wrote:

> I have just noticed this large(ish) directory under C:/Windows.
>
> Is this new (i.e. post SP3) or has it always been there? What is its
> function.
>
> My searches show that it is an innovation for Vista. However, it is
> definitely there in Win XP now, as a retro-fit?
>
> The only consolation - its does not gobble up as much space as the 6GB
> Vista equivalent.

 
Unread 16-06-2008, 11:12 AM   #3
VanguardLH
Guest
 
Posts: n/a
Re: WinSxS directory - what is it about

"occam" wrote in <news:OkMBto3zIHA.2408@TK2MSFTNGP04.phx.gbl>:

> I have just noticed this large(ish) directory under C:/Windows.
>
> Is this new (i.e. post SP3) or has it always been there? What is its
> function.
>
> My searches show that it is an innovation for Vista. However, it is
> definitely there in Win XP now, as a retro-fit?
>
> The only consolation - its does not gobble up as much space as the 6GB
> Vista equivalent.


It's called: Windows Side-by-Side (SxS) Component Sharing

Read:
http://blog.tiensivu.com/aaron/archi...-20032008.html

One purpose of these folder hierarchy is to eliminate DLL Hell by
providing multiple but different versions of the same DLL. Applications
may expect a specific version and will fail if that version is not
available. They may not be able to use an older or newer version. Not
all DLLs are backward compatible so an entry point in an old DLL may not
exist in a newer version, the result of which is the application
complaining that the entry point is undefined and the application fails.
This folder is also used by SFC to keep multiple different versions of
files.

http://technet.microsoft.com/en-us/l.../bb490859.aspx

This feature has existed since Windows 2000 so, yes, "it always been
there" but, as per the next article, it was achieved by using the DLL
files within the application's installation folder rather than managing
its own manifest of them. As per the above article, "it always been
there" in Windows XP.

http://support.microsoft.com/kb/815065

I haven't watched the %windir%\WinSxS folder in my Windows XP Pro
installation but my backups go back several weeks and that folder is
there (and I installed SP-3 just a few days ago). If you want some
programming background on SxS then read:

http://msdn.microsoft.com/en-us/libr...07(VS.85).aspx

While my SxS inventory is only around 224 files consuming about 41MB of
disk space, it can range up to 5 to 8 GB in size. It all depends on
what you install.
 
Unread 16-06-2008, 12:12 PM   #4
occam
Guest
 
Posts: n/a
Re: WinSxS directory - what is it about

VanguardLH wrote:


Thank you both (VanguardLH, John) - very useful.
 
 

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT. The time now is 12:13 PM.


vBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2013, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional