Skip to content

Commit

Permalink
Merge pull request #11800 from dotnet/main
Browse files Browse the repository at this point in the history
Merge main PRs into 10 branch
  • Loading branch information
JeremyKuhne authored Aug 1, 2024
2 parents a584478 + e2ec84c commit 33cf608
Show file tree
Hide file tree
Showing 98 changed files with 580 additions and 469 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ are automatically referenced for Window Forms .NET applications.

`AppManifestAnalyzer` is automatically invoked when a Windows Forms application (`OutputType=Exe` or `OutputType=WinExe`) has a custom app.manifest.

## [WFAC010](https://aka.ms/winforms-warnings/WFAC010): Unsupported high DPI configuration.
## [WFO0003](https://aka.ms/winforms-warnings/WFAC010): Unsupported high DPI configuration.

Windows Forms applications should specify application DPI-awareness via the [application configuration](https://aka.ms/applicationconfiguration) or
[`Application.SetHighDpiMode` API](https://docs.microsoft.com/dotnet/api/system.windows.forms.application.sethighdpimode).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void Initialize()
For more information on application configuration refer to https://aka.ms/applicationconfiguration.


## [WFAC001](https://aka.ms/winforms-warnings/WFAC001): Unsupported project type.
## [WFO0001](https://aka.ms/winforms-warnings/WFAC001): Unsupported project type.

Only projects with `OutputType` set to "Exe" or "WinExe" are supported, because only applications projects define an application entry point,
where the application bootstrap code must reside.
Expand All @@ -33,7 +33,7 @@ where the application bootstrap code must reside.
---


## [WFAC002](https://aka.ms/winforms-warnings/WFAC002): Unsupported property value.
## [WFO0002](https://aka.ms/winforms-warnings/WFAC002): Unsupported property value.

The specified project property cannot be set to the given value.

Expand Down
10 changes: 10 additions & 0 deletions docs/analyzers/Experimental.Help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# List of WinForms Experimental Function Areas

System.Windows.Forms.Analyzers analyzers and source generators are shipped inbox with Windows Desktop .NET SDK, and
are automatically referenced for Window Forms .NET applications.

| Diagnostic ID | Description |
| :------------- | :---------- |
| __`WFO5000`__ | Functionality around Visual Styling is experimental in .NET 9. |
| __`WFO5001`__ | Functionality around Dark Mode Colors is experimental in .NET 9. |
| __`WFO5002`__ | New ASync APIs for e.g. consuming Windows projected APIs, WebView2 or AI/LLM Libs are experimental in .NET 9. |
39 changes: 39 additions & 0 deletions docs/analyzers/WinFormsCSharpAnalyzers.Help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# How to use System.Windows.Forms.Analyzers

System.Windows.Forms.Analyzers analyzers and source generators are shipped inbox with Windows Desktop .NET SDK, and
are automatically referenced for Window Forms .NET applications.

## `AppManifestAnalyzer`

`AppManifestAnalyzer` is automatically invoked when a Windows Forms application (`OutputType=Exe` or `OutputType=WinExe`) has a custom app.manifest.

### [WFO0003](https://aka.ms/winforms-warnings/WFAC010): Unsupported high DPI configuration.

Windows Forms applications should specify application DPI-awareness via the [application configuration](https://aka.ms/applicationconfiguration) or
[`Application.SetHighDpiMode` API](https://docs.microsoft.com/dotnet/api/system.windows.forms.application.sethighdpimode).

|Item|Value|
|-|-|
| Category | ApplicationConfiguration |
| Enabled | True |
| Severity | Warning |
| CodeFix | False |
---

## `MissingPropertySerializationConfiguration`

`MissingPropertySerializationConfiguration` checks for missing `DesignerSerializationVisibilityAttribute` on properties of classes which are
derived from `Control` and could potentially serialize design-time data by the designer without the user being aware of it.

### [WFO1000](https://aka.ms/winforms-warnings/WFO1000): Missing property serialization configuration.

Properties of classes derived from `Control` should have `DesignerSerializationVisibilityAttribute`
set to `DesignerSerializationVisibility.Content` or `DesignerSerializationVisibility.Visible`.

|Item|Value|
|-|-|
| Category | ApplicationConfiguration |
| Enabled | True |
| Severity | Warning |
| CodeFix | False |
---
39 changes: 39 additions & 0 deletions docs/analyzers/WinFormsVisualBasicAnalyzers.Help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# How to use System.Windows.Forms.Analyzers

System.Windows.Forms.Analyzers analyzers and source generators are shipped inbox with Windows Desktop .NET SDK, and
are automatically referenced for Window Forms .NET applications.

## `AppManifestAnalyzer`

`AppManifestAnalyzer` is automatically invoked when a Windows Forms application (`OutputType=Exe` or `OutputType=WinExe`) has a custom app.manifest.

### [WFO0003](https://aka.ms/winforms-warnings/WFAC010): Unsupported high DPI configuration.

Windows Forms applications should specify application DPI-awareness via the [application configuration](https://aka.ms/applicationconfiguration) or
[`Application.SetHighDpiMode` API](https://docs.microsoft.com/dotnet/api/system.windows.forms.application.sethighdpimode).

|Item|Value|
|-|-|
| Category | ApplicationConfiguration |
| Enabled | True |
| Severity | Warning |
| CodeFix | False |
---

## `MissingPropertySerializationConfiguration`

`MissingPropertySerializationConfiguration` checks for missing `DesignerSerializationVisibilityAttribute` on properties of classes which are
derived from `Control` and could potentially serialize design-time data by the designer without the user being aware of it.

### [WFO1000](https://aka.ms/winforms-warnings/WFO1000): Missing property serialization configuration.

Properties of classes derived from `Control` should have `DesignerSerializationVisibilityAttribute`
set to `DesignerSerializationVisibility.Content` or `DesignerSerializationVisibility.Visible`.

|Item|Value|
|-|-|
| Category | ApplicationConfiguration |
| Enabled | True |
| Severity | Warning |
| CodeFix | False |
---
7 changes: 7 additions & 0 deletions docs/analyzers/akams.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
https://aka.ms/WfoGenManifest https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Analyzers/AppManifestAnalyzer.Help.md
https://aka.ms/WfoExperimental https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Analyzers/Experimental.Help.md

https://aka.ms/WfoCsAppConfig https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Analyzers.CSharp/ApplicationConfigurationGenerator.Help.md
https://aka.ms/WfoCsAnalyzers https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Analyzers.CSharp/WinFormsCSharpAnalyzers.Help.md

https://aka.ms/WfoVbAnalyzers https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Analyzers.VisualBasic/WinFormsVisualBasicAnalyzers.Help.md
Loading

0 comments on commit 33cf608

Please sign in to comment.