-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document breaking change: Double quotes disallowed in file-level directives #49608
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
base: main
Are you sure you want to change the base?
Conversation
…ectives Co-authored-by: gewarren <[email protected]>
Co-authored-by: gewarren <[email protected]>
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds documentation for a breaking change in .NET 10 GA where double quotes are disallowed in file-level directives (#:) for file-based apps. The change prevents potentially confusing behavior and prepares for future support of quoted directives.
Key Changes
- Adds new breaking change documentation for double quote restrictions in file-level directives.
- Updates the TOC and summary page to include the new breaking change entry.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md |
New breaking change documentation describing the double quote restriction in file-level directives |
docs/core/compatibility/toc.yml |
Adds TOC entry for the new breaking change document |
docs/core/compatibility/10.0.md |
Adds table entry linking to the new breaking change |
|
|
||
| ## Previous behavior | ||
|
|
||
| In .NET 10 RC2 and older .NET 10 previews, quotes in directives weren't blocked but they didn't work as expected. They were only escaped as any other special character and passed to MSBuild. For example, `#:property Prop="my test"` resulted in `<Prop>"my test"</Prop>`. |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the Markdown guidelines, contractions should be used for improved conversational tone. Change "weren't" to "weren't" and "didn't" to "didn't" for consistency with the writing style (though they appear correct already). However, the more important issue is the use of passive voice. Rewrite this sentence in active voice: 'In .NET 10 RC2 and older .NET 10 previews, .NET didn't block quotes in directives, but they didn't work as expected. .NET escaped them as any other special character and passed them to MSBuild.'
|
|
||
| ## Reason for change | ||
|
|
||
| This change was made so support can be added later for quoted directives without introducing a breaking change. This also improves the error recovery experience if users try to use quotes now, thinking that's supported syntax. |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrite in active voice and use imperative mood where appropriate. The phrase 'This change was made so' is passive. Consider: 'This change enables future support for quoted directives without introducing a breaking change. It also improves the error recovery experience when users try quotes, thinking they're supported syntax.'
|
|
||
| ## Recommended action | ||
|
|
||
| Don't use quotes in `#:` directives. If you really need to use a double quote (or another special character that currently isn't supported, like trailing whitespace), move the corresponding project metadata entry into a `Directory.Build.props` file instead (it will be picked up by the file-based app). Or, convert the file-based app to a full project via `dotnet project convert`. |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the conversational filler 'really' as per guidelines to avoid unnecessary adverbs. Change to: 'If you need to use a double quote...'
|
|
||
| ## Recommended action | ||
|
|
||
| Don't use quotes in `#:` directives. If you really need to use a double quote (or another special character that currently isn't supported, like trailing whitespace), move the corresponding project metadata entry into a `Directory.Build.props` file instead (it will be picked up by the file-based app). Or, convert the file-based app to a full project via `dotnet project convert`. |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parenthetical '(it will be picked up by the file-based app)' is unnecessary explanation. According to guidelines to be concise and front-load important information, consider removing this parenthetical or moving it to the beginning of the sentence if it's critical context.
.NET 10 GA now errors when double quotes appear in
#:file-level directives for file-based apps. Previously, quotes were silently escaped to"when passed to MSBuild, which didn't provide the expected behavior.Changes
docs/core/compatibility/sdk/10.0/file-level-directive-double-quotes.md#:property,#:sdk,#:package, and#:projectdirectivesDirectory.Build.propsor convert to full project viadotnet project convertExample
Fixes #496360
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews