Skip to content

Commit 8d7face

Browse files
committed
Fix #if example in multi file docs
1 parent 9badd70 commit 8d7face

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation/general/dotnet-run-file.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Internally, the SDK CLI detects entry points by parsing all `.cs` files in the d
7171
and checking which ones contain top-level statements (`Main` methods are not supported for now as that would require full semantic analysis, not just parsing).
7272
Results of this detection are used to exclude other entry points from [builds](#multiple-entry-points) and [app directive collection](#directives-for-project-metadata).
7373
This means the CLI might consider a file to be an entry point which later the compiler doesn't
74-
(for example because its top-level statements are under `#if SYMBOL` and the build has `DefineConstants=SYMBOL`).
74+
(for example because its top-level statements are under `#if !SYMBOL` and the build has `DefineConstants=SYMBOL`).
7575
However such inconsistencies should be rare and hence that is a better trade off than letting the compiler decide which files are entry points
7676
because that could require multiple builds (first determine entry points and then re-build with app directives except those from other entry points).
7777
To avoid parsing all C# files twice (in CLI and in the compiler), the CLI could use the compiler server for parsing so the trees are reused

0 commit comments

Comments
 (0)