Skip to content

Commit 1419af7

Browse files
authored
Add information about how the clipboard/dataobject changes in .NET 10 (#2129)
* Update base copilot instructions * Create project folder with supporting materials * Generate a plan as an instructions file based on the supporting information and the desire to upgrade clipboard code * Phase 1 article: Initial * Phase 1 article: Expand plan in the sections * Phase 1 article: Query LLM about best way to communicate; move to HTML comments * Phase 1 article: Intro/Prereqs first draft * Phase 1 article: Intro/Prereqs final draft (3 iterations) * Add additional resource to instructions * Phase 1 article: Breaking changes section * Move plan file * Phase 1 article: Add summary section * Phase 1 article: Finish 2 more sections * Phase 1 article: Update prereqs * Phase 1 article: Remove sections I think are already covered well enough * Phase 1 article: Finish Enable BinaryFormatter support section * Phase 1 article: Custom types section * Phase 1 article: Make intro better * Phase 1: article: Copilot section * Phase 1 article: Edit pass 1 * Phase 1 article: Edit pass 2 (claude) * Phase 1 complete * Fix build errs * Phase 2.1: Complete * Add xref links * Copy code snippets to local folder * Add instruction files * Update how-to-add-data * Phase 2.2 Completed * Update instructions * Phase 2.3: Brief edit pass * Phase 2.3: Migrate snippets * More copilot updates * Phase 2.3: Final commit before build * Fix snippet ids * More instruction updates * Phase 1: Convert code to snippets * Update instructions * Phase 3.3: Complete * Fix code and move around * Fix the projects and ref * Remove temp project files * Update the RefreshLink prompt * Fix link * Fix project file * Update instructions again * Update snippets per feedback * Remove the ITypedDataObject snippet as it didn't teach anything * Add missing instruction * Inlined all the silly method writelines copilot generated * More prompt updates * Pre-upgrade commit: Save current changes before .NET 10 upgrade * Remove dupe note * temp * Add some info about SetDataObject and copy param * Clarify it applies to WPF too * Change pivot * Fix zone pivot name * try adjust zone pivot * Feedback * Rearrange clipboard subjects * Add opposite net-only include * Clean up how-to articles * Too many headers - Adjust some * Fix highlight attribute * Convert snippet instructions to prompts * Move note * Fix highlight
1 parent 0dbcd9c commit 1419af7

File tree

146 files changed

+11102
-149
lines changed

Some content is hidden

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

146 files changed

+11102
-149
lines changed

.github/copilot-instructions.md

Lines changed: 75 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,34 @@
22

33
## Disclosure
44

5-
IMPORTANT: For any Markdown files generated by AI, always disclose that they were created with the assistance of AI. Add the following frontmatter key/value pair:
5+
IMPORTANT: For any Markdown files generated by AI, always disclose that they were created with the assistance of AI. If missing, add the `ai-usage` frontmatter key/value pair:
66

7-
```markdown
8-
ai-usage: ai-generated
9-
```
10-
11-
## Terminology
7+
- When reviewing a PR not created by AI:
128

13-
- Unless otherwise specified, all .NET content refers to modern .NET (not .NET Framework).
9+
```markdown
10+
ai-usage: ai-assisted
11+
```
1412

15-
## Writing Style
13+
- When Copilot generates the article through GitHub without the use of a human:
1614

17-
Follow [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/) with these specifics:
15+
```markdown
16+
ai-usage: ai-generated
17+
```
1818

19-
### Voice and Tone
19+
- When using an IDE with a human guiding AI:
2020

21-
- Active voice, second person addressing reader directly.
22-
- Conversational tone with contractions.
23-
- Present tense for instructions/descriptions.
24-
- Imperative mood for instructions ("Call the method" not "You should call the method").
25-
- Use "might" instead of "may" for possibility.
26-
- Use "can" instead of "may" for permissible actions.
27-
- Avoid "we"/"our" referring to documentation authors or product teams.
21+
```markdown
22+
ai-usage: ai-assisted
23+
```
2824

29-
### Structure and Format
25+
## New articles
3026

31-
- Sentence case headings (no gerunds in titles).
32-
- Be concise, break up long sentences.
33-
- IMPORTANT: Oxford comma in lists.
34-
- Number all ordered list items as "1." (not sequential numbering like "1.", "2.", "3.", etc.)
35-
- IMPORTANT: Use bullets for unordered lists.
36-
- VERY IMPORTANT: Ordered and unordered lists should use complete sentences with proper punctuation, ending with a period if it's more than three words.
37-
- Avoid "etc." or "and so on" - provide complete lists or use "for example".
38-
- No consecutive headings without content between them.
27+
- New articles must follow a template in the /.github/projects/article-templates/ folder.
28+
- If you don't know which template to use, ask.
3929

40-
### Formatting Conventions
30+
## Terminology
4131

42-
- **Bold** for UI elements.
43-
- `Code style` for file names, folders, custom types, non-localizable text.
44-
- Raw URLs in angle brackets.
45-
- Use relative links for files in this repo.
46-
- Remove `https://learn.microsoft.com/en-us` from learn.microsoft.com links.
32+
- Unless otherwise specified, all .NET content refers to modern .NET (not .NET Framework).
4733

4834
## API References
4935

@@ -66,11 +52,66 @@ For snippets >6 lines:
6652
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.
6753
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.
6854

55+
## .NET Framework vs .NET differences
56+
57+
When documenting differences between .NET Framework and .NET (like .NET 6 and newer), choose the appropriate system:
58+
59+
### Use Tabs
60+
Use tabbed content when the differences are code-based:
61+
62+
```markdown
63+
# [.NET](#tab/dotnet)
64+
65+
<how it works in .NET>
66+
67+
# [.NET Framework](#tab/dotnetframework)
68+
69+
<how it works in .NET Framework>
70+
71+
---
72+
```
73+
74+
### Use Pivots
75+
Use zone pivots when there are conceptual differences that can't easily be explained with tabs and a note. Pivots allow for more comprehensive explanations of different approaches or methodologies.
76+
77+
To use zone pivots:
78+
79+
1. Add `zone_pivot_groups: desktop-version` to the article's frontmatter
80+
2. Use zone pivot syntax in content:
81+
82+
```markdown
83+
::: zone pivot="dotnet"
84+
85+
Your .NET content here
86+
87+
::: zone-end
88+
89+
::: zone pivot="dotnetframework"
90+
91+
Your .NET Framework content here
92+
93+
::: zone-end
94+
```
95+
6996
## File Naming
7097

7198
New Markdown files: lowercase with hyphens, omit filler words (the, a, etc.).
7299

100+
Examples:
101+
- ✅ Good: `getting-started-with-entity-framework.md`
102+
- ✅ Good: `configure-logging.md`
103+
- ✅ Good: `dependency-injection-guidelines.md`
104+
- ❌ Bad: `Getting-Started-With-The-Entity-Framework.md`
105+
- ❌ Bad: `configure_logging.md`
106+
- ❌ Bad: `DependencyInjectionGuidelines.md`
107+
73108
## Special Cases
74109

75-
- Breaking changes: Include directions from `.github/prompts/breaking-change.md`.
76-
- 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.
110+
### GitHub Issue Assignment (AI Workflow)
111+
When assigned an issue in GitHub:
112+
1. Complete your work
113+
2. Wait for workflows (status checks) to run
114+
3. Check for build warnings in the OpenPublishing.Build status check
115+
4. If warnings exist:
116+
- Click "View Details" to open the build report
117+
- Resolve any build warnings you introduced
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
applyTo: 'dotnet-desktop-guide/**/*.md'
3+
description: 'Follow these comprehensive writing style guidelines when creating or editing Markdown documentation. Apply active voice, conversational tone, Oxford commas, and specific formatting rules to ensure consistency and readability across all documentation.'
4+
---
5+
6+
# Markdown Writing Style Instructions
7+
8+
When writing or editing Markdown documentation, follow these style guidelines:
9+
10+
## Voice and Tone Requirements
11+
12+
ALWAYS write using:
13+
- Active voice with second person ("you")
14+
- Conversational tone with contractions
15+
- Present tense for instructions and descriptions
16+
- Imperative mood for instructions (write "Call the method" NOT "You should call the method")
17+
- "might" for possibility (NOT "may")
18+
- "can" for permissible actions (NOT "may")
19+
20+
NEVER use:
21+
- "we" or "our" when referring to documentation authors or product teams
22+
- Jargon or overly complex technical language
23+
- Weak phrases like "you can" or "there is/are/were" unless they add value
24+
25+
ALWAYS:
26+
- Write like you speak using everyday words
27+
- Create a friendly, informal tone
28+
- Start statements with verbs when possible
29+
30+
## Structure and Format Rules
31+
32+
### Headings and Content
33+
- Use sentence case headings (capitalize only first word and proper nouns)
34+
- Never use gerunds in titles
35+
- Never place consecutive headings without content between them
36+
- Lead with the most important information first
37+
- Front-load keywords for scanning
38+
39+
### Lists and Punctuation
40+
- **CRITICAL: Use Oxford comma in ALL lists (item1, item2, and item3) - NO EXCEPTIONS**
41+
- **MANDATORY: Number ordered lists using "1." for every item (NOT 1., 2., 3.) - ALWAYS USE "1."**
42+
- **REQUIRED: Use bullets for unordered lists - NEVER use numbers for unordered content**
43+
- **ESSENTIAL: Write complete sentences in lists with proper punctuation**
44+
- **MUST: End list items with periods if more than three words - THIS IS NON-NEGOTIABLE**
45+
- Skip end punctuation on titles, headings, and UI elements (3 words or fewer)
46+
47+
### Spacing and Layout
48+
- Add blank lines around Markdown elements (but don't add extra if they exist)
49+
- Use only one space after periods, question marks, and colons
50+
- Use no spaces around dashes (word—word)
51+
- Break up long sentences for clarity
52+
53+
### Prohibited Terms
54+
- Never write "etc." or "and so on" - provide complete lists or use "for example"
55+
- Use "for example" instead of "e.g."
56+
- Use "that is" instead of "i.e."
57+
58+
## Formatting Conventions
59+
60+
Apply these formatting rules:
61+
- **Bold text** for UI elements
62+
- `Code style` for file names, folders, custom types, and non-localizable text
63+
- Raw URLs in angle brackets
64+
- Relative links for files in this repository
65+
- Remove `https://learn.microsoft.com/en-us` from Microsoft Learn links
66+
67+
## Word Choice Requirements
68+
69+
### Verb Selection
70+
- Choose simple verbs without modifiers
71+
- Avoid weak verbs: "be," "have," "make," "do"
72+
- Use precise verbs (write "tell" NOT "inform")
73+
74+
### Conciseness Rules
75+
- Use one word instead of multiple when possible (write "to" NOT "in order to")
76+
- Choose words with one clear meaning (write "because" NOT "since" for causation)
77+
- Omit unnecessary adverbs unless critical to meaning
78+
- Use one term consistently for each concept
79+
80+
### Contraction Guidelines
81+
- Use common contractions: "it's," "you're," "that's," "don't"
82+
- Avoid ambiguous contractions: "there'd," "it'll," "they'd"
83+
- Never form contractions from noun + verb (avoid "Microsoft's developing")
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ms.topic: <implementation-name> version 1.0.0
2+
items:
3+
- name: <Suggested title>
4+
href: <path-template>
5+
required: yes
6+
limit: 1
7+
- name: <Suggested title>
8+
href: <path-template>
9+
required: yes
10+
limit: 1
11+
- name: <Suggested title>
12+
href: <path-template>
13+
required: No
14+
limit: none
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ms.topic: <implementation-name> version 1.0.0
2+
items:
3+
- name: <Suggested title>
4+
href: /<guide-name>/toc.yml
5+
required: yes
6+
limit: 1
7+
- name: <Suggested title>
8+
href: /<guide-name>/toc.yml
9+
required: yes
10+
limit: 1
11+
- name: <Suggested title>
12+
href: /<guide-name>/toc.yml
13+
required: yes
14+
limit: none
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
title: [Follow SEO guidance at
3+
https://review.learn.microsoft.com/en-us/help/platform/seo-meta-title]
4+
description: "[Article description]."
5+
author: [your GitHub alias]
6+
ms.author: [your Microsoft alias or a team alias]
7+
ms.service: [the approved service name]
8+
ms.topic: troubleshooting-general #Don't change.
9+
ms.date: [mm/dd/yyyy]
10+
11+
#customer intent: As a <role>, I want <what> so that <why>.
12+
13+
---
14+
15+
<!-- --------------------------------------
16+
17+
- Use this template with pattern instructions for:
18+
19+
Troubleshooting
20+
21+
- Before you sign off or merge:
22+
23+
Remove all comments except the customer intent.
24+
25+
- Feedback:
26+
27+
https://aka.ms/patterns-feedback
28+
29+
-->
30+
31+
# Troubleshoot [issues with a product or service]
32+
33+
<!-- Required: Article headline - H1
34+
35+
Identify the product or service the article
36+
applies to.
37+
38+
-->
39+
40+
[Introduce and explain the purpose of the article.]
41+
42+
<!-- Required: Introductory paragraphs (no heading)
43+
44+
Write a brief introduction that can help the user
45+
determine whether the article is relevant for them
46+
and to describe the specific issue that the article
47+
covers.
48+
49+
-->
50+
51+
## Prerequisites
52+
53+
<!-- Optional: Prerequisites - H2
54+
55+
If this section is needed, make "Prerequisites" the
56+
first H2 in the article.
57+
58+
Use clear and unambiguous language, and use
59+
an unordered list format.
60+
61+
-->
62+
63+
## [Potential quick workarounds]
64+
65+
1. Procedure step
66+
1. Procedure step
67+
68+
<!-- Optional: Potential quick workarounds - H2
69+
70+
An issue might be able to be temporarily resolved with a
71+
quick fix. If one is known, list any workarounds that can be
72+
implemented quickly to resolve the issue. Link to
73+
information about longer-term solutions in the
74+
"Solution" section.
75+
76+
-->
77+
78+
## [Troubleshooting checklist]
79+
80+
### [Troubleshooting step]
81+
82+
<!-- Required: Troubleshooting checklist - H2
83+
84+
Provide guidance about how the user can troubleshoot
85+
the issues and determine the cause of the issue. You
86+
can include H3 sections to describe the troubleshooting
87+
steps.
88+
89+
-->
90+
91+
## [Causes and/or solutions]
92+
93+
### [Solution]
94+
95+
1. Procedure step
96+
1. Procedure step
97+
98+
<!-- Required: Causes and/or solutions - H2
99+
100+
Provide at least one cause or solution. Define the
101+
cause of the issue if it's known.
102+
103+
If the problem is correctable, include one or more
104+
solutions. Use H3 sections for troubleshooting steps.
105+
106+
Make sure that the H3 solution headings clearly state the
107+
intention ofthe solution section. Each solution section
108+
should have a short sentence that describes the steps
109+
that are about to be taken.
110+
111+
-->
112+
113+
## [Advanced troubleshooting and data collection]
114+
115+
<!-- Optional: Advanced troubleshooting/data collection - H2
116+
117+
Include this section if advanced troubleshooting is
118+
needed and might require a call for support. List any
119+
information or procedures in this section to help the user
120+
submit a support ticket. You can use numbered steps or
121+
blocks of text.
122+
123+
-->
124+
125+
## Related content
126+
127+
- [Related article title](link.md)
128+
- [Related article title](link.md)
129+
- [Related article title](link.md)
130+
131+
<!-- Optional: Related content - H2
132+
133+
Consider including a "Related content" H2 section that
134+
lists links to 1 to 3 articles the user might find helpful.
135+
136+
-->
137+
138+
<!--
139+
140+
Remove all comments except the customer intent
141+
before you sign off or merge to the main branch.
142+
143+
-->

0 commit comments

Comments
 (0)