You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Runtime Async |[runtime-async](https://github.com/dotnet/roslyn/tree/features/runtime-async)|[Merged into main in preview](https://github.com/dotnet/roslyn/issues/75960)|[333fred](https://github.com/333fred)|[jcouv](https://github.com/jcouv), [RikkiGibson](https://github.com/RikkiGibson)|||
Copy file name to clipboardExpand all lines: docs/features/file-based-programs-vscode.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,3 +57,8 @@ Any of the above is met, and, the file is not included in an ordinary `.csproj`
57
57
### Opt-out
58
58
59
59
We added an opt-out flag with option name `dotnet.projects.enableFileBasedPrograms`. If issues arise with the file-based program experience, then VS Code users should set the corresponding setting `"dotnet.projects.enableFileBasedPrograms": false` to revert back to the old miscellaneous files experience.
60
+
61
+
We also have a second, finer-grained opt-out flag `dotnet.projects.enableFileBasedProgramsWhenAmbiguous`. This flag is conditional on the previous flag (i.e. it is ignored when `enableFileBasedPrograms` is `false`). This is used to allow opting out only in cases where it is unclear from the single file itself, whether it should be treated as a file-based program. Presence of `#:` or `#!` directives in a `.cs` file strongly indicates that the file is a file-based program, and editor functionality will continue to light up for such files, even when `enableFileBasedProgramsWhenAmbiguous` is `false`.
62
+
63
+
> [!NOTE]
64
+
> The second flag is being used on a short-term basis while we work out the set of heuristics and cross-component APIs needed to efficiently and satisfactorily resolve whether a file with top-level statements but no directives is a file-based program in the context of a complex workspace.
Copy file name to clipboardExpand all lines: src/Analyzers/CSharp/Analyzers/AddRequiredParentheses/CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer.cs
+17-14Lines changed: 17 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -51,28 +51,31 @@ protected override int GetPrecedence(ExpressionSyntax binaryLike)
0 commit comments