Declaring Managed Applications As DPI-Aware
To declare your managed application as DPI-aware in Microsoft Visual Studio 2008, do the following:
-
In the Solution Explorer, right-click on your project (suppose your project is named DPIAware), point to Add, and then click New Item.
-
In the Add New Item – DPIAware dialog box, select Application Manifest File, and then click Add. The app.manifest file appears.

-
Copy and paste the following text into the app.manifest file and then save.
<?xml version="1.0" encoding="utf-8"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" > <asmv3:application> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>true</dpiAware> </asmv3:windowsSettings> </asmv3:application> </assembly> -
In the Solution Explorer, right-click on the DPIAware project, and then click Properties to verify that the app.manifest is used.

-
Your application is now DPI-aware.
For information on how to make your Win32 applications DPI-aware, see Writing High-DPI Win32 Applications.
Send comments about this topic to Microsoft
Build date: 2/3/2012
- 2/17/2012
- Rulin Hong
- 2/17/2012
- Rulin Hong
Installing ClickOnce published applications is not possible if there is the tag in the manifest file about the dpi-awareness. I've checked this in visual studio 2010 many times. If there's a tag <asmv3:windowsettings> in the manifest file then the published application fails to install. It's enough to comment-out this whole tag before publishing and application installs fine.
I wonder if it has something to do with the url in the xmlns attribute. Typing this url in the web browser returns an error.
- 1/14/2012
- piast9