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
Copy file name to clipboardExpand all lines: documentation/general/dotnet-run-file.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,11 +71,11 @@ We want to report an error for non-entry-point files to avoid the confusion of b
71
71
72
72
Internally, the SDK CLI detects entry points by parsing all `.cs` files in the directory tree of the entry point file with default parsing options (in particular, no `<DefineConstants>`)
73
73
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).
74
-
Results of this detection are used to exclude other entry points from [builds](#multiple-entry-points) and [app directive collection](#directives-for-project-metadata).
74
+
Results of this detection are used to exclude other entry points from [builds](#multiple-entry-points) and [file-level directive collection](#directives-for-project-metadata).
75
75
This means the CLI might consider a file to be an entry point which later the compiler doesn't
76
76
(for example because its top-level statements are under `#if !SYMBOL` and the build has `DefineConstants=SYMBOL`).
77
77
However such inconsistencies should be rare and hence that is a better trade off than letting the compiler decide which files are entry points
78
-
because that could require multiple builds (first determine entry points and then re-build with app directives except those from other entry points).
78
+
because that could require multiple builds (first determine entry points and then re-build with file-level directives except those from other entry points).
79
79
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
80
80
(unless the parse options change via the directives), and also [cache](#optimizations) the results to avoid parsing on subsequent runs.
81
81
@@ -146,7 +146,7 @@ They are not cleaned immediately because they can be re-used on subsequent runs
146
146
147
147
## Directives for project metadata
148
148
149
-
It is possible to specify some project metadata via *app directives*
149
+
It is possible to specify some project metadata via *file-level directives*
150
150
which are [ignored][ignored-directives] by the C# language but recognized by the SDK CLI.
151
151
Directives `sdk`, `package`, and `property` are translated into `<Project Sdk="...">`, `<PackageReference>`, and `<Property>` project elements, respectively.
152
152
Other directives result in an error, reserving them for future use.
0 commit comments