Issue 120394
Summary [clang-cl] Generates bad manifest XML for Visual Studio UAC settings
Labels new issue
Assignees
Reporter d3x0r
    This is an example of where the settings get set.

![Image](https://github.com/user-attachments/assets/22bc8e9b-574d-4f37-a66d-abbb791d579e)


Clang-CL generates XML that looks like this

``` xml
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <ms_asmv1:trustInfo xmlns="urn:schemas-microsoft-com:asm.v3" xmlns:ms_asmv1="urn:schemas-microsoft-com:asm.v1">
 <ms_asmv1:security>
      <ms_asmv1:requestedPrivileges>
 <ms_asmv1:requestedExecutionLevel ms_asmv1:level="requireAdministrator" ms_asmv1:uiAccess="false"/>
      </ms_asmv1:requestedPrivileges>
 </ms_asmv1:security>
  </ms_asmv1:trustInfo>
</assembly>
```

Where a good manifest looks like

``` xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
 <requestedPrivileges>
                <requestedExecutionLevel
 level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
 </requestedPrivileges>
        </security>
 </trustInfo>
</assembly>
```

When the clang generated manifest is used in the program the porgram throws a 'side-by-side installation error' sort of error...  

`The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.`


when using the sxstrace tool gave me an error message when I did a profile and converted it to a log...

```
	ERROR: Line 6: The required attribute level is missing from element requestedExecutionLevel.
```

`level` is what it's looking for not `ms_asmv1:level` apparently.  There's no automatic namespacing of tags in most path/node based xml parsers....

I could fall back and run a `mt.exe ...` command and embed a correct manifest while this is broken... but really respecting the options and building the file should work.   

This causes a service or admin tool to not be able to run.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to