3
votes

I installed the final Version of Visual Studio 2019. I read that is has this new feature to work correctly on a system with different DPI screens.

The Requirements are "Windows 10, 1803" (I have 1809) and .NET Framework 4.8 (installed the current Preview).

The Option in Visual Studio 2019 is still grayed out.

I have no clue why. - Has anyone else succeeded in activating this setting?

4

4 Answers

1
votes

The final version of .NET Framework 4.8 was released on April 18, 2019. I installed it today, and this option now works in Visual Studio 2019. Upgrade from the preview and you should be good to go: https://dotnet.microsoft.com/download

1
votes

from https://developercommunity.visualstudio.com/comments/578963/view.html

I found what caused the issue. It was a registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\devenv.exe]

"dpiAwareness"=dword:00000001

After I deleted it everything works as it should.

Worked on my machine.

The Registry key may have been installed when I re-installed VS2017 after VS2019 lapsed into CPUholism

1
votes

Another reason why Visual Studio has the option grayed out is that the Visual Studio is run by clicking *.sln file in an app having HIGHDPIAWARE flag set.

The flag is usually set by right clicking the app -> Compatibility -> Change high DPI settings -> Override high DPI scaling behavior. Scaling performed by Application. It will add ~ HIGHDPIAWARE string for the app path to:

Computer\HKEY_USERS\S-1-5-21-786552173-3883971264-3181160094-1001\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

The flag can be removed by UI or deleting the key by regedit.exe from the above registry path.

If you click the *.sln file in a file manager app which has the flag set, Visual Studio Optimize rendering will be disabled.

So just ensure all the parent processes of Visual Studio have the flag disabled.

0
votes

https://docs.microsoft.com/en-us/visualstudio/ide/reference/general-environment-options-dialog-box?view=vs-2019

As stated in the tip dialog box, windows has a setting "Let Windows try to fix apps so they're not blurry". Turning that off and restarting Visual Studio 2019 fixed this.

Note that I have all the minimum requirements