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
<!-- These aliases need to live outside of Versions.props as VMR / source-build overwrites some of the version properties for live builds. -->
86
93
<PropertyGroup>
87
94
<!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 version above and create aliases without the winx64 here for clarity elsewhere. -->
> When acquiring installers from the .NET SDK latest builds table, be aware that the installers are the **latest bits**. With development builds, internal NuGet feeds are necessary for some scenarios (for example, to acquire the runtime pack for self-contained apps). You can use the following NuGet.config to configure these feeds. See the following document [Configuring NuGet behavior](https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior) for more information on where to modify your NuGet.config to apply the changes.
Copy file name to clipboardExpand all lines: documentation/general/dotnet-run-file.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ We call these *file-based programs* (as opposed to *project-based programs*).
7
7
dotnet run file.cs
8
8
```
9
9
10
+
See also [IDE spec](https://github.com/dotnet/roslyn/blob/main/docs/features/file-based-programs-vscode.md).
11
+
10
12
## Motivation
11
13
12
14
File-based programs
@@ -71,7 +73,7 @@ Internally, the SDK CLI detects entry points by parsing all `.cs` files in the d
71
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).
72
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).
73
75
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`).
76
+
(for example because its top-level statements are under `#if !SYMBOL` and the build has `DefineConstants=SYMBOL`).
75
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
76
78
because that could require multiple builds (first determine entry points and then re-build with app directives except those from other entry points).
77
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
0 commit comments