If you are developing applications for Windows Vista using Visual Studio 2005, and you are adding Vista UAC manifest to your application, when your application runs on Windows XP with Service Pack 2 or Windows Server 2003 RTM (without SP1), Windows may reboot unexpectly.

This is due to a bug in Sxs.dll that it improperly handles duplicated namespaces in the same XML element. The following is an example of the problematic XML file:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="" processorArchitecture="X86" name="MyApp" type="win32"> </assemblyIdentity>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"> </assemblyIdentity>
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3" xmlns="urn:schemas-microsoft-com:asm.v3">
<ms_asmv3:security xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false">

Notice there are two namespaces for element trustInfo, and they are duplicate.

To workaround this bug, remove one of the duplicated namespaces (for example, remove the namespace in red).

A hotfix is available in http://support.microsoft.com/kb/921337.

This bug is fixed in Windows Server 2003 SP1 and Windows Vista.