You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a warning output in the analyze command related to using the new SetHighDpiMode API, but it's not very clear.
First, my project isn't setting DPI in app.config or app.manifest so it telling me that I shouldn't do that makes no sense.
Second, why is this a warning?
Third, considering that .NET 6 and WinForms contains a whole new startup bootstrap, this is the least of the worries of upgrading the app. The note should instead be specific about how there is a whole new startup bootstrap and that the user should visit some aka.ms link for more information. That article could be more specific about upgrading to the new bootstrap.
Or the upgrade should generate a new program file (named program.new.cs or something) using the namespace/type information from the project. The user could then replace their code.
[16:25:16 INF] Loaded 5 extensions
[16:25:17 INF] Using MSBuild from C:\Program Files\dotnet\sdk\6.0.100\
[16:25:17 INF] Using Visual Studio install from C:\Program Files\Microsoft Visual Studio\2022\Professional [v17]
[16:25:20 INF] Recommending Windows TFM net6.0-windows because the project either has Windows-specific dependencies or builds to a WinExe
[16:25:21 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.3.261302) needs to be added
[16:25:22 INF] Adding Microsoft.Windows.Compatibility 6.0.0
[16:25:22 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.3.261302) needs to be added
[16:25:22 INF] Running analyzers on MatchingGame
[16:25:23 INF] Identified 0 diagnostics in project MatchingGame
[16:25:23 INF] Running analyzers on MatchingGame.Logic
[16:25:23 INF] Identified 0 diagnostics in project MatchingGame.Logic
<<--- Here is the entry that is confusing --->>
[16:25:23 WRN] HighDpiMode needs to set in Main() instead of app.config or app.manifest - Application.SetHighDpiMode(HighDpiMode.<setting>). It is recommended to use SystemAware as the HighDpiMode option for better results.
Motivation and goals
It's confusing that this note is a warning, and honestly, as someone using analyze, I don't really know what to do with that information if I'm new to .NET 6 + WinForms startup bootstrap changes.
In scope
N/A
Out of scope
N/A
Risks / unknowns
N/A
Examples
N/A
The text was updated successfully, but these errors were encountered:
I appreciate you raising this issue. Seeing the HighDpiMode error confused me. It wasn't applicable to my project so I spent some time googling to find out what it meant and how I was supposed to fix it. Eventually I stumbled on this post and realised I could just ignore it. So once again, thanks, that helped me.
Summary
There is a warning output in the analyze command related to using the new
SetHighDpiMode
API, but it's not very clear.First, my project isn't setting DPI in
app.config
orapp.manifest
so it telling me that I shouldn't do that makes no sense.Second, why is this a warning?
Third, considering that .NET 6 and WinForms contains a whole new startup bootstrap, this is the least of the worries of upgrading the app. The note should instead be specific about how there is a whole new startup bootstrap and that the user should visit some aka.ms link for more information. That article could be more specific about upgrading to the new bootstrap.
Or the upgrade should generate a new program file (named
program.new.cs
or something) using the namespace/type information from the project. The user could then replace their code.Motivation and goals
It's confusing that this note is a warning, and honestly, as someone using analyze, I don't really know what to do with that information if I'm new to .NET 6 + WinForms startup bootstrap changes.
In scope
N/A
Out of scope
N/A
Risks / unknowns
N/A
Examples
N/A
The text was updated successfully, but these errors were encountered: