Skip to content

Commit 2606252

Browse files
Merge pull request #47971 from dotnet/main
Merge main into live
2 parents 0bf811f + 83702f4 commit 2606252

File tree

68 files changed

+1018
-307
lines changed

Some content is hidden

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

68 files changed

+1018
-307
lines changed

.github/copilot-instructions.md

Lines changed: 59 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,59 @@
1-
When you're assigned an issue, after you've completed your work and the workflows (status checks) have run, check to make sure there are no build warnings under the OpenPublishing.Build status check. If there are, open the build report (under View Details) and resolve any build warnings you introduced.
2-
3-
When writing documentation, follow the following guidelines:
4-
5-
Unless otherwise specified, all .NET content refers to modern .NET (not .NET Framework).
6-
7-
Follow the style of the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/).
8-
9-
Headings should be in sentence case, not title case. Don't use gerunds in titles.
10-
11-
Use the active voice whenever possible, and second person to address the reader directly.
12-
13-
Use a conversational tone with contractions.
14-
15-
Be concise.
16-
17-
Break up long sentences.
18-
19-
Use the present tense for instructions and descriptions. For example, "The method returns a value" instead of "The method will return a value."
20-
21-
Do not use "we" or "our" to refer to the authors of the documentation.
22-
23-
Use the imperative mood for instructions. For example, "Call the method" instead of "You should call the method."
24-
25-
Use "might" instead of "may" to indicate possibility. For example, "This method might throw an exception" instead of "This method may throw an exception."
26-
27-
Use the Oxford comma in lists of three or more items.
28-
29-
Number ordered list items all as "1." instead of "1.", "2.", etc.
30-
31-
Use bullets for unordered lists. Unless *all* the bullet list items are three words or less, each bullet item should end with a period.
32-
33-
Use **bold** when referring to UI elements. Use `code style` for file names and folders, custom types, and other text that should never be localized.
34-
35-
Put raw URLs within angle brackets.
36-
37-
Include links to related topics and resources where appropriate. Use relative links if the target file lives in this repo. If you add a link to another page on learn.microsoft.com that's not in this repo, remove https://learn.microsoft.com/en-us from the link.
38-
39-
When mentioning APIs, use cross-references to the API documentation. These links are formatted as <xref:api-doc-ID>. You can find the API doc ID in the XML files in the https://github.com/dotnet/dotnet-api-docs repository. For types, the doc ID is the value of the `Value` attribute of the `<TypeSignature>` element where the `Language` attribute value is `DocId`. For other (member) APIs, the doc ID is the value of the `Value` attribute of the `<MemberSignature>` element where the `Language` attribute value is `DocId`. Omit the first two characters of the DocId. For example, the xref link for System.String is <xref:System.String>.
40-
41-
If you're assigned a GitHub issue that's labeled "breaking-change", include the prompt directions in the .github/prompts/breaking-change.md file in this repo.
42-
43-
If you include a code snippet that's more than 6 lines long, put it in a separate .cs file in a folder named "snippets" in the same folder as the document. Within the "snippets" folder, add a new directory with the name of the document. For example, if the document is named "my-doc.md", create a folder named "snippets/my-doc" folder. Also add a simple .csproj file to the same directory that targets the latest version of .NET. It can be a library or executable project.
44-
45-
If you're adding a new Markdown file, it should be named in all lowercase with hyphens separating words. Also, omit any filler words such as "the" or "a" from the file name.
1+
# .NET Documentation Guidelines
2+
3+
## Terminology
4+
- Unless otherwise specified, all .NET content refers to modern .NET (not .NET Framework).
5+
6+
## Writing Style
7+
Follow [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) with these specifics:
8+
9+
### Voice and Tone
10+
- Active voice, second person addressing reader directly.
11+
- Conversational tone with contractions.
12+
- Present tense for instructions/descriptions.
13+
- Imperative mood for instructions ("Call the method" not "You should call the method").
14+
- Use "might" instead of "may" for possibility.
15+
- Use "can" instead of "may" for permissible actions.
16+
- Avoid "we"/"our" referring to documentation authors or product teams.
17+
18+
### Structure and Format
19+
- Sentence case headings (no gerunds in titles).
20+
- Be concise, break up long sentences.
21+
- Oxford comma in lists.
22+
- Number all ordered list items as "1." (not sequential numbering like "1.", "2.", "3.", etc.)
23+
- Use bullets for unordered lists.
24+
- Ordered and unordered lists should use complete sentences with proper punctuation, ending with a period if it's more than three words.
25+
- Avoid "etc." or "and so on" - provide complete lists or use "for example".
26+
- No consecutive headings without content between them.
27+
28+
### Formatting Conventions
29+
- **Bold** for UI elements.
30+
- `Code style` for file names, folders, custom types, non-localizable text.
31+
- Raw URLs in angle brackets.
32+
- Use relative links for files in this repo.
33+
- Remove `https://learn.microsoft.com/en-us` from learn.microsoft.com links.
34+
35+
## API References
36+
Use cross-references: `<xref:api-doc-ID>`.
37+
38+
To find API doc IDs:
39+
1. Check XML files in https://github.com/dotnet/dotnet-api-docs.
40+
2. For types: `Value` attribute of `<TypeSignature>` where `Language="DocId"` (omit first 2 characters).
41+
3. For members: `Value` attribute of `<MemberSignature>` where `Language="DocId"` (omit first 2 characters).
42+
43+
If unsure, use API browser: `https://learn.microsoft.com/api/apibrowser/dotnet/search?api-version=0.2&locale=en-us&search={API_NAME}&$skip=0&$top=5` and then use the `url` value from the results as a manual link.
44+
45+
## Code Snippets
46+
For snippets >6 lines:
47+
1. Create `./snippets/my-doc/language` folder in same directory as document (for a document named `my-doc.md`) where language is either vb (for visual basic) or csharp (for c#). Omit the `language` component when the document is in the `docs/visual-basic`, `docs/csharp`, or `docs/fsharp` folders.
48+
1. Add snippet as separate code file.
49+
1. Include simple project file targeting latest .NET.
50+
1. All code should use the latest stable versions/features.
51+
1. Create examples in both C# and Visual Basic unless the article referencing the snippet resides in the in the `csharp`, `fsharp`, and `visual-basic` language folders.
52+
1. When you add code, use code comments sparingly because they don't get localized. You can use them to briefly clarify code-specific details (such as logic, parameters, or edge cases). Put any critical information and context in the markdown text of the referencing article.
53+
54+
## File Naming
55+
New Markdown files: lowercase with hyphens, omit filler words (the, a, etc.).
56+
57+
## Special Cases
58+
- Breaking changes: Include directions from `.github/prompts/breaking-change.md`.
59+
- When you (Copilot) are assigned an issue in GitHub, after you've completed your work and the workflows (status checks) have run, check to make sure there are no build warnings under the OpenPublishing.Build status check. If there are, open the build report (under View Details) and resolve any build warnings you introduced.

docfx.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@
362362
"docs/core/project-sdk/**/**.md": "gewarren",
363363
"docs/core/runtime-config/**/**.md": "gewarren",
364364
"docs/core/testing/**/**.md": "IEvangelist",
365-
"docs/core/tools/**/**.md": "tdykstra",
366-
"docs/core/tutorials/**/**.md": "tdykstra",
365+
"docs/core/tools/**/**.md": "adegeo",
366+
"docs/core/tutorials/**/**.md": "billwagner",
367367
"docs/core/versions/**/**.md": "billwagner",
368368
"docs/core/whats-new/**/**.md": "gewarren",
369369
"docs/csharp/**/*.*": "billwagner",
@@ -408,7 +408,7 @@
408408
"docs/standard/attributes/**/**.md": "gewarren",
409409
"docs/standard/base-types/**/**.md": "adegeo",
410410
"docs/standard/collections/**/**.md": "IEvangelist",
411-
"docs/standard/commandline/**/**.md": "tdykstra",
411+
"docs/standard/commandline/**/**.md": "gewarren",
412412
"docs/standard/data/**/**.md": "gewarren",
413413
"docs/standard/data/sqlite/**/**.md": "ajcvickers",
414414
"docs/standard/datetime/**/**.md": "adegeo",
@@ -455,8 +455,8 @@
455455
"docs/core/project-sdk/**/**.md": "gewarren",
456456
"docs/core/runtime-config/**/**.md": "gewarren",
457457
"docs/core/testing/**/**.md": "dapine",
458-
"docs/core/tools/**/**.md": "tdykstra",
459-
"docs/core/tutorials/**/**.md": "tdykstra",
458+
"docs/core/tools/**/**.md": "adegeo",
459+
"docs/core/tutorials/**/**.md": "wiwagn",
460460
"docs/core/versions/**/**.md": "wiwagn",
461461
"docs/core/whats-new/**/**.md": "gewarren",
462462
"docs/csharp/**/*.*": "wiwagn",
@@ -496,7 +496,7 @@
496496
"docs/standard/attributes/**/**.md": "gewarren",
497497
"docs/standard/base-types/**/**.md": "adegeo",
498498
"docs/standard/collections/**/**.md": "dapine",
499-
"docs/standard/commandline/**/**.md": "tdykstra",
499+
"docs/standard/commandline/**/**.md": "gewarren",
500500
"docs/standard/data/**/**.md": "gewarren",
501501
"docs/standard/datetime/**/**.md": "adegeo",
502502
"docs/standard/design-guidelines/**/**.md": "kcwalina",

docs/core/compatibility/10.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,5 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
129129

130130
| Title | Type of change | Introduced version |
131131
|-------|---------------------------------------|--------------------|
132+
| [Empty ColumnDefinitions and RowDefinitions are disallowed](wpf/10.0/empty-grid-definitions.md) | Source incompatible | Preview 5 |
132133
| [Incorrect usage of DynamicResource causes application crash](wpf/10.0/dynamicresource-crash.md) | Source incompatible/behavioral change | Preview 4 |

docs/core/compatibility/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ items:
144144
href: windows-forms/10.0/statusstrip-renderer.md
145145
- name: WPF
146146
items:
147+
- name: Empty ColumnDefinitions and RowDefinitions are disallowed
148+
href: wpf/10.0/empty-grid-definitions.md
147149
- name: Incorrect usage of DynamicResource causes application crash
148150
href: wpf/10.0/dynamicresource-crash.md
149151
- name: .NET 9
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Breaking change - Empty ColumnDefinitions and RowDefinitions are disallowed"
3+
description: "Learn about the breaking change in WPF in .NET 10 where empty Grid.ColumnDefinitions or Grid.RowDefinitions declarations now cause MC3063 compilation errors."
4+
ms.date: 08/11/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/47743
7+
---
8+
9+
# Empty ColumnDefinitions and RowDefinitions are disallowed
10+
11+
Starting with .NET 10, WPF applications fail to build if `<Grid.ColumnDefinitions>` or `<Grid.RowDefinitions>` are declared but left empty in XAML. This results in error `MC3063`, which indicates that the property doesn't have a value.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 5
16+
17+
## Previous behavior
18+
19+
Previously, WPF applications with empty `<Grid.ColumnDefinitions>` or `<Grid.RowDefinitions>` compiled successfully, even though the layout definitions were incomplete. The layout defaulted to a single row and column, placing all child elements in that single cell unless otherwise specified.
20+
21+
Example that previously compiled:
22+
23+
```xml
24+
<Grid>
25+
<Grid.ColumnDefinitions>
26+
</Grid.ColumnDefinitions>
27+
</Grid>
28+
```
29+
30+
## New behavior
31+
32+
Starting in .NET 10, the same code now fails to compile with the following error:
33+
34+
```output
35+
error MC3063: Property 'ColumnDefinitions' does not have a value.
36+
```
37+
38+
This occurs when `<Grid.ColumnDefinitions>` or `<Grid.RowDefinitions>` elements are declared but contain no child `<ColumnDefinition />` or `<RowDefinition />` elements.
39+
40+
## Type of breaking change
41+
42+
This change can affect [source compatibility](../../categories.md#source-compatibility).
43+
44+
## Reason for change
45+
46+
This change is a direct consequence of implementing Grid XAML Shorthand Syntax support.
47+
48+
## Recommended action
49+
50+
Ensure that all `<Grid.ColumnDefinitions>` and `<Grid.RowDefinitions>` contains at least one valid or element.
51+
52+
Corrected example:
53+
54+
```xml
55+
<Grid>
56+
<Grid.ColumnDefinitions>
57+
<ColumnDefinition />
58+
</Grid.ColumnDefinitions>
59+
</Grid>
60+
```
61+
62+
## Affected APIs
63+
64+
None.

0 commit comments

Comments
 (0)