Skip to content

Commit c739343

Browse files
committed
Merge branch 'net10.0' into fix-30010
2 parents 4884451 + 1e3d94b commit c739343

File tree

727 files changed

+12202
-5806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

727 files changed

+12202
-5806
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"rollForward": false
2525
},
2626
"microsoft.dotnet.xharness.cli": {
27-
"version": "10.0.0-prerelease.25327.1",
27+
"version": "10.0.0-prerelease.25330.2",
2828
"commands": [
2929
"xharness"
3030
],

.github/DEVELOPMENT.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ Use ‘main’ for bug fixes that don’t require API changes. For new features
7474
7575
- [Testing Wiki](https://github.com/dotnet/maui/wiki/Testing)
7676
77+
## Generating PublicAPI Files
78+
79+
If you've added new public APIs and are getting build errors about missing API declarations, you'll need to update the PublicAPI files. You can generate the PublicAPI files manually by building a project with the `PublicApiType=Generate` property:
80+
81+
```dotnetcli
82+
dotnet build ./src/Controls/src/Core/Controls.Core.csproj /p:PublicApiType=Generate
83+
```
84+
85+
This approach will generate the `PublicAPI.Unshipped.txt` files for that specific project. You may need to run this for each project that has new public APIs.
86+
87+
**Note:** If you're still having troubles with PublicAPI errors, you can delete all the content in the relevant `PublicAPI.Unshipped.txt` files and then run the command above to regenerate them completely.
88+
7789

7890
## Stats
7991

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 14 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,16 @@ body:
4242
label: Version with bug
4343
description: In what version do you see this issue? Run `dotnet workload list` to find your version.
4444
options:
45+
- 10.0.0-preview.6
4546
- 10.0.0-preview.5
4647
- 10.0.0-preview.4
4748
- 10.0.0-preview.3
4849
- 10.0.0-preview.2
4950
- 10.0.0-preview.1
51+
- 9.0.90 SR9
52+
- 9.0.82 SR8.2
53+
- 9.0.81 SR8.1
54+
- 9.0.80 SR8
5055
- 9.0.70 SR7
5156
- 9.0.61 SR6.1
5257
- 9.0.60 SR6
@@ -68,26 +73,7 @@ body:
6873
- 9.0.0-preview.3.10457
6974
- 9.0.0-preview.2.10293
7075
- 9.0.0-preview.1.9973
71-
- 8.0.100 SR10
72-
- 8.0.93 SR9.3
73-
- 8.0.92 SR9.2
74-
- 8.0.91 SR9.1
75-
- 8.0.90 SR9
76-
- 8.0.83 SR8.3
77-
- 8.0.82 SR8.2
78-
- 8.0.80 SR8
79-
- 8.0.71 SR7.1
80-
- 8.0.70 SR7
81-
- 8.0.61 SR6.1
82-
- 8.0.60 SR6
83-
- 8.0.40 SR5
84-
- 8.0.21 SR4.1
85-
- 8.0.20 SR4
86-
- 8.0.14 SR3.1
87-
- 8.0.10 SR3
88-
- 8.0.7 SR2
89-
- 8.0.6 SR1
90-
- 8.0.3 GA
76+
- .NET 8 (Out of support, please specify exact version)
9177
- Nightly / CI build (Please specify exact version)
9278
- Unknown/Other
9379
validations:
@@ -113,47 +99,9 @@ body:
11399
options:
114100
-
115101
- Unknown/Other
116-
- 6.0
117-
- 7.0.49
118-
- 7.0.52
119-
- 7.0.58
120-
- 7.0.59
121-
- 7.0.81
122-
- 7.0.86
123-
- 7.0.92
124-
- 7.0.96
125-
- 7.0.100
126-
- 7.0.101
127-
- 8.0.0-preview.1.7762
128-
- 8.0.0-preview.2.7871
129-
- 8.0.0-preview.3.8149
130-
- 8.0.0-preview.4.8333
131-
- 8.0.0-preview.5.8529
132-
- 8.0.0-preview.6.8686
133-
- 8.0.0-preview.7.8842
134-
- 8.0.0-rc.1.9171
135-
- 8.0.0-rc.2.9373
136-
- 8.0.0-rc.2.9511
137-
- 8.0.3 GA
138-
- 8.0.6 SR1
139-
- 8.0.7 SR2
140-
- 8.0.10 SR3
141-
- 8.0.14 SR3.1
142-
- 8.0.20 SR4
143-
- 8.0.21 SR4.1
144-
- 8.0.40 SR5
145-
- 8.0.60 SR6
146-
- 8.0.61 SR6.1
147-
- 8.0.70 SR7
148-
- 8.0.71 SR7.1
149-
- 8.0.80 SR8
150-
- 8.0.82 SR8.2
151-
- 8.0.83 SR8.3
152-
- 8.0.90 SR9
153-
- 8.0.91 SR9.1
154-
- 8.0.92 SR9.2
155-
- 8.0.93 SR9.3
156-
- 8.0.100 SR10
102+
- .NET 6 (Please specify exact version)
103+
- .NET 7 (Please specify exact version)
104+
- .NET 8 (Please specify exact version)
157105
- 9.0.0-preview.1.9973
158106
- 9.0.0-preview.2.10293
159107
- 9.0.0-preview.3.10457
@@ -175,11 +123,16 @@ body:
175123
- 9.0.60 SR6
176124
- 9.0.61 SR6.1
177125
- 9.0.70 SR7
126+
- 9.0.80 SR8
127+
- 9.0.81 SR8.1
128+
- 9.0.82 SR8.2
129+
- 9.0.90 SR9
178130
- 10.0.0-preview.1
179131
- 10.0.0-preview.2
180132
- 10.0.0-preview.3
181133
- 10.0.0-preview.4
182134
- 10.0.0-preview.5
135+
- 10.0.0-preview.6
183136
validations:
184137
required: true
185138
- type: dropdown

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ contact_links:
33
- name: .NET MAUI Community Support
44
url: https://learn.microsoft.com/answers/topics/dotnet-maui.html
55
about: Please ask and answer questions here.
6-
- name: Bug report or feature request for Visual Studio for Windows and Mac
7-
url: https://learn.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022
6+
- name: Bug report or feature request for Visual Studio
7+
url: https://learn.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio
88
about: Use Visual Studio's Report a Problem feature for issues and suggestions with Visual Studio tooling
99
- name: Bug report or feature request for Visual Studio Code (including C# Dev Kit)
1010
url: https://github.com/microsoft/vscode-dotnettools/issues

.github/copilot-instructions.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,50 @@ dotnet cake --target=dotnet-pack
110110
- `src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj`
111111
- `src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj`
112112

113+
#### UI Testing Guidelines
114+
115+
When adding UI tests to validate visual behavior and user interactions, follow this two-part pattern:
116+
117+
**CRITICAL: UITests require code in TWO separate projects that must BOTH be implemented:**
118+
119+
1. **HostApp UI Test Page** (`src/Controls/tests/TestCases.HostApp/Issues/`)
120+
- Create the actual UI page that demonstrates the feature or reproduces the issue
121+
- Use XAML with proper `AutomationId` attributes on interactive controls for test automation
122+
- Follow naming convention: `IssueXXXXX.xaml` and `IssueXXXXX.xaml.cs`
123+
- Ensure the UI provides clear visual feedback for the behavior being tested
124+
125+
2. **NUnit Test Implementation** (`src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/`)
126+
- Create corresponding Appium-based NUnit tests that inherit from `_IssuesUITest`
127+
- Use the `AutomationId` values to locate and interact with UI elements
128+
- Follow naming convention: `IssueXXXXX.cs` (matches the HostApp file)
129+
- Include appropriate `[Category(UITestCategories.XYZ)]` attributes
130+
- Test should validate expected behavior through UI interactions and assertions
131+
132+
**UI Test Pattern Example:**
133+
```csharp
134+
// In TestCases.Shared.Tests/Tests/Issues/IssueXXXXX.cs
135+
public class IssueXXXXX : _IssuesUITest
136+
{
137+
public override string Issue => "Description of the issue being tested";
138+
139+
public IssueXXXXX(TestDevice device) : base(device) { }
140+
141+
[Test]
142+
[Category(UITestCategories.Layout)] // or appropriate category
143+
public void TestMethodName()
144+
{
145+
App.WaitForElement("AutomationId");
146+
App.Tap("AutomationId");
147+
// Add assertions to verify expected behavior
148+
}
149+
}
150+
```
151+
152+
**Before committing UI tests:**
153+
- Compile both the HostApp project and TestCases.Shared.Tests project to ensure no build errors
154+
- Verify AutomationId references match between XAML and test code
155+
- Ensure tests follow the established naming and inheritance patterns
156+
113157
### Code Formatting
114158

115159
Before committing any changes, format the codebase using the following command to ensure consistent code style:
@@ -152,6 +196,27 @@ For compatibility with specific branches:
152196

153197
## Contribution Guidelines
154198

199+
### Handling Existing PRs for Assigned Issues
200+
201+
**🚨 CRITICAL REQUIREMENT: Always develop your own solution first, then compare with existing PRs.**
202+
203+
When working on an issue:
204+
205+
1. **FIRST: Develop your own solution** - Come up with your own implementation approach without looking at existing PRs. Analyze the issue, understand the requirements, and design your solution independently
206+
2. **THEN: Search for existing PRs** - After you have developed your solution approach, search for open PRs that address the same issue using GitHub search or issue links
207+
3. **Compare solutions thoroughly** - Examine the existing PR's proposed changes, implementation approach, and any discussion in comments. Compare this to your own solution
208+
4. **Evaluate and choose the best approach** - Decide which solution (yours or the existing PR's) better addresses the issue and follows best practices
209+
5. **Always document your decision** - In your PR description, always include a summary comparing your solution to any other open PRs for the issue you are working on, and explain why you chose your approach over the alternatives
210+
6. **Report on why you didn't choose other solutions** - Always make sure to explain the specific reasons why you didn't go with other existing solutions, including any concerns or issues you identified
211+
7. **It's OK to abandon existing PRs** - If you're not confident enough in the existing PR's approach, it's completely acceptable to abandon it and implement your own solution
212+
8. **Pull existing changes when you prefer them** - If you determine the existing solution is better than your approach, pull those changes into your PR as the foundation for your work, then find areas to improve and add tests
213+
9. **Identify improvement opportunities** - Whether you use your solution or an existing one, look for areas where you can enhance it, such as:
214+
- Adding comprehensive test coverage
215+
- Improving code quality, performance, or maintainability
216+
- Enhancing error handling or edge case coverage
217+
- Better documentation or code comments
218+
- More robust implementation patterns
219+
155220
### Files to Never Commit
156221
- **Never** check in changes to `cgmanifest.json` files
157222
- **Never** check in changes to `templatestrings.json` files
@@ -163,6 +228,17 @@ Since coding agents function as both CI and pair programmers, they need to handl
163228
- **Always reset changes to `cgmanifest.json` files** - These are generated during CI builds and should not be committed by coding agents
164229
- **Always reset changes to `templatestrings.json` files** - These localization files are auto-generated and should not be committed by coding agents
165230

231+
### PublicAPI.Unshipped.txt File Management
232+
When working with public API changes, proper handling of PublicAPI.Unshipped.txt files is critical:
233+
234+
- **Never turn off analyzers or set no warn** to fix PublicAPI.Unshipped.txt file issues
235+
- **Always work to fix the PublicAPI.Unshipped.txt files properly** by adding the correct API entries
236+
- **Use `dotnet format analyzers`** if having trouble fixing PublicAPI.Unshipped.txt file issues
237+
- **Revert and re-add approach when files are incorrect:**
238+
1. First, revert all changes to PublicAPI.Unshipped.txt files to their original state
239+
2. Then, make only the necessary additions required for your new public APIs
240+
3. This ensures clean, minimal changes that accurately reflect the new APIs being introduced
241+
166242
### Branching
167243
- `main` - For bug fixes without API changes
168244
- `net10.0` - For new features and API changes

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
echo "$GITHUB_WORKSPACE/.dotnet" >> "$GITHUB_PATH"
3636
echo "DOTNET_ROOT=$GITHUB_WORKSPACE/.dotnet" >> "$GITHUB_ENV"
3737
echo "DOTNET_INSTALL_DIR=$GITHUB_WORKSPACE/.dotnet" >> "$GITHUB_ENV"
38+
echo "DOTNET_SYSTEM_NET_SECURITY_NOREVOCATIONCHECKBYDEFAULT=true" >> "$GITHUB_ENV"
3839
3940
- name: Ensure we are using the correct .NET
4041
shell: pwsh

.vscode/mcp.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,2 @@
11
{
2-
"inputs": [
3-
{
4-
"type": "promptString",
5-
"id": "github-key",
6-
"password": true, // Encrypted at-rest
7-
"description": "GitHub PAT"
8-
}
9-
],
10-
"servers": {
11-
"github": {
12-
"command": "docker",
13-
"args": [
14-
"run",
15-
"-i",
16-
"--rm",
17-
"-e",
18-
"GITHUB_PERSONAL_ACCESS_TOKEN",
19-
"ghcr.io/github/github-mcp-server"
20-
],
21-
"env": {
22-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-key}"
23-
}
24-
}
25-
}
262
}

docs/DevelopmentTips.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ for IntelliSense and other tasks to initialize. If the project hasn't 'settled'
2121

2222
The below parameters can be used with the `dotnet cake` command in the root of your locally cloned .NET MAUI repository folder.
2323

24+
#### PublicAPI Management
25+
`--target=publicapi`
26+
- Clears and regenerates PublicAPI.Unshipped.txt files across all MAUI projects (Core, Controls, Essentials, Graphics)
27+
- Use this when you've added new public APIs and are getting build errors about missing API declarations
28+
- Automatically skips Windows-specific files when not running on Windows, and always skips Tizen files
29+
30+
```bash
31+
dotnet cake --target=publicapi
32+
```
33+
2434
#### Clean
2535
`--clean`
2636
- Occasionally, when switching branches or syncing with the main branch, incremental builds may stop working. A common fix for this is to use git clean -xdf to delete all locally cached build information. However, the issue with git clean -xdf is that it will also wipe out any uncommitted changes. Using --clean to recursively delete the local obj/bin folders should hopefully resolve the issue while preserving your changes.

eng/NuGetVersions.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@
267267
Update="Microsoft.CodeAnalysis.PublicApiAnalyzers"
268268
Version="$(MicrosoftCodeAnalysisPublicApiAnalyzersVersion)"
269269
/>
270+
<PackageReference
271+
Update="Mono.ApiTools.MSBuildTasks"
272+
Version="$(MonoApiToolsMSBuildTasksPackageVersion)"
273+
/>
270274
<PackageReference
271275
Update="Tizen.UIExtensions.NUI"
272276
Version="$(TizenUIExtensionsVersion)"

0 commit comments

Comments
 (0)