Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross build win-x64 on macOS: app.manifest requireAdministrator not working #91047

Closed
kzhui125 opened this issue Aug 24, 2023 · 4 comments
Closed

Comments

@kzhui125
Copy link

Description

cross build win-x64 on macOS: app.manifest requireAdministrator not working

Reproduction Steps

On macOS:

  1. dotnet new console (dotnet 7)
  2. add <ApplicationManifest>app.manifest</ApplicationManifest> to csproj
  3. add app.manifest:
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity version="1.0.0.0" name="MyApplication"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
    </application>
  </compatibility>

</assembly>
  1. dotnet build -r win-x64 --no-self-contained
  2. copy the build file to Windows Server.

Expected behavior

requireAdministrator works

Actual behavior

the requireAdministrator setting is not working:

image image

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 24, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 24, 2023
@huoyaoyuan huoyaoyuan added area-Host and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 24, 2023
@ghost
Copy link

ghost commented Aug 24, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

cross build win-x64 on macOS: app.manifest requireAdministrator not working

Reproduction Steps

On macOS:

  1. dotnet new console (dotnet 7)
  2. add <ApplicationManifest>app.manifest</ApplicationManifest> to csproj
  3. add app.manifest:
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity version="1.0.0.0" name="MyApplication"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
    </application>
  </compatibility>

</assembly>
  1. dotnet build -r win-x64 --no-self-contained
  2. copy the build file to Windows Server.

Expected behavior

requireAdministrator works

Actual behavior

the requireAdministrator setting is not working:

image image

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Author: kzhui125
Assignees: -
Labels:

area-Host, untriaged

Milestone: -

@huoyaoyuan
Copy link
Member

It's a known issue: #66906

@vitek-karas
Copy link
Member

This is #3828. It has been fixed in .NET 8 - you should be able to use the .NET 8 SDK to target net7.0 and the fix should still apply.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Aug 24, 2023
@kzhui125
Copy link
Author

Thanks

@ghost ghost locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants