Skip to content

Commit 9d1b5af

Browse files
Desktop: include manifest so we run as admin
1 parent 419ebf5 commit 9d1b5af

File tree

2 files changed

+37
-49
lines changed

2 files changed

+37
-49
lines changed

src/Certify.UI.Desktop/Certify.UI.Desktop.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<XamlDebuggingInformation>True</XamlDebuggingInformation>
1111
<NoWarn>NU1701</NoWarn>
1212
<LangVersion>latest</LangVersion>
13+
<ApplicationManifest>app.manifest</ApplicationManifest>
1314

1415
</PropertyGroup>
1516
<ItemGroup>
Lines changed: 36 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
23
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3-
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
4-
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5-
<security>
6-
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7-
<!-- UAC Manifest Options
4+
<assemblyIdentity version="7.0.0.0" name="Certify.UI.Desktop.app" />
5+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
6+
<security>
7+
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
8+
<!-- UAC Manifest Options
89
If you want to change the Windows User Account Control level replace the
910
requestedExecutionLevel node with one of the following.
1011
@@ -16,54 +17,40 @@
1617
Remove this element if your application requires this virtualization for backwards
1718
compatibility.
1819
-->
19-
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
20-
</requestedPrivileges>
21-
<applicationRequestMinimum>
22-
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
23-
<defaultAssemblyRequest permissionSetReference="Custom" />
24-
</applicationRequestMinimum>
25-
</security>
26-
</trustInfo>
27-
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
28-
<application>
29-
<!-- A list of the Windows versions that this application has been tested on and is
20+
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
21+
</requestedPrivileges>
22+
<applicationRequestMinimum>
23+
<PermissionSet Unrestricted="true" ID="Custom" SameSite="site" />
24+
<defaultAssemblyRequest permissionSetReference="Custom" />
25+
</applicationRequestMinimum>
26+
</security>
27+
</trustInfo>
28+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
29+
<application>
30+
<!-- A list of the Windows versions that this application has been tested on and is
3031
is designed to work with. Uncomment the appropriate elements and Windows will
3132
automatically selected the most compatible environment. -->
32-
<!-- Windows Vista -->
33-
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
34-
<!-- Windows 7 and Windows Server 2008 R2 -->
35-
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
36-
<!-- Windows 8 and Windows Server 2012 -->
37-
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
38-
<!-- Windows 8.1 and Windows Server 2012 R2 -->
39-
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
40-
<!-- Windows 10, Windows Server 2016 and Windows Server 2019 -->
41-
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
42-
</application>
43-
</compatibility>
44-
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
33+
<!-- Windows Vista -->
34+
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
35+
<!-- Windows 7 and Windows Server 2008 R2 -->
36+
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
37+
<!-- Windows 8 and Windows Server 2012 -->
38+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
39+
<!-- Windows 8.1 and Windows Server 2012 R2 -->
40+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
41+
<!-- Windows 10, Windows Server 2016 and Windows Server 2019 -->
42+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
43+
</application>
44+
</compatibility>
45+
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
4546
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
4647
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
4748
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
4849

49-
<application xmlns="urn:schemas-microsoft-com:asm.v3">
50-
<windowsSettings>
51-
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
52-
</windowsSettings>
53-
</application>
50+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
51+
<windowsSettings>
52+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
53+
</windowsSettings>
54+
</application>
5455

55-
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
56-
<!--
57-
<dependency>
58-
<dependentAssembly>
59-
<assemblyIdentity
60-
type="win32"
61-
name="Microsoft.Windows.Common-Controls"
62-
version="6.0.0.0"
63-
processorArchitecture="*"
64-
publicKeyToken="6595b64144ccf1df"
65-
language="*" />
66-
</dependentAssembly>
67-
</dependency>
68-
-->
69-
</assembly>
56+
</assembly>

0 commit comments

Comments
 (0)