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

[diagnostic]: WFO0002 Unsupported property value. #2024

Closed
2 tasks done
Tanya-Solyanik opened this issue Mar 4, 2025 · 0 comments · Fixed by #2021
Closed
2 tasks done

[diagnostic]: WFO0002 Unsupported property value. #2024

Tanya-Solyanik opened this issue Mar 4, 2025 · 0 comments · Fixed by #2021
Assignees
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] in-pr Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Label to indicate an item has been imported.

Comments

@Tanya-Solyanik
Copy link
Member

Tanya-Solyanik commented Mar 4, 2025

Technology

Windows Forms

Languages that apply

  • C#
  • Visual Basic

Default Reporting Scope

Error

Rule ID

WFO0002

.editorConfig Setting ID

dotnet_dagnostics.WFO0002

Short Title

Unsupported property value

Description

This error will generate one of the following messages -
ArgumentException: Project property '{0}' cannot be set to '{1}'
ArgumentException: Project property '{0}' cannot be set to '{1}'. Reason: {2}.

It was first implemented n NET6 with the following feature - https://learn.microsoft.com/en-us/dotnet/desktop/winforms/whats-new/net60?view=netdesktop-6.0#new-application-bootstrap as WFAC002 and then renamed in NET9 to WFO0002

This error is raised when one of the following project properties is set to an invalid value in the project file:

<ApplicationVisualStyles>true</ApplicationVisualStyles>
<ApplicationUseCompatibleTextRendering>false</ApplicationUseCompatibleTextRendering>
<ApplicationHighDpiMode>SystemAware</ApplicationHighDpiMode>
<ApplicationDefaultFont>Microsoft Sans Serif, 8.25pt</ApplicationDefaultFont>

And the code generator fails to generate appropriate code-behind.

How to fix

Set a valid value or remove ApplicationConfiguration.Initialize. If this error is suppressed AplicationConfiguration code wouldn't be generated and application will not run


Associated WorkItem - 402811

@Tanya-Solyanik Tanya-Solyanik added doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 labels Mar 4, 2025
@dotnet-policy-service dotnet-policy-service bot added the ⌚ Not Triaged Not triaged label Mar 4, 2025
@adegeo adegeo removed the ⌚ Not Triaged Not triaged label Mar 5, 2025
@dotnetrepoman dotnetrepoman bot added the 🗺️ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. label Mar 5, 2025
@adegeo adegeo moved this from 🔖 Ready to 👀 In review in dotnet/docs March 2025 sprint project Mar 5, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 🗺️ mapQUEST Only used as a way to mark an issue as updated. RepoMan should instantly remove it. label Mar 5, 2025
@adegeo adegeo added the 🗺️ reQUEST Trigger label to import an issue into Quest label Mar 5, 2025
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in dotnet/docs March 2025 sprint project Mar 5, 2025
@sequestor sequestor bot added 📌 seQUESTered Label to indicate an item has been imported. and removed 🗺️ reQUEST Trigger label to import an issue into Quest labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] in-pr Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Label to indicate an item has been imported.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants