8000 Update multi-file 'dotnet run file' documentation by jjonescz · Pull Request #48437 · dotnet/sdk · GitHub
[go: up one dir, main page]

Skip to content

Update multi-file 'dotnet run file' documentation #48437

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

Merged
merged 22 commits into from
May 7, 2025
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify working and output directory
  • Loading branch information
@jjonescz 8000
jjonescz committed Apr 15, 2025
commit de7f95b995178a886e514584444d0b5503ca0841
8 changes: 5 additions & 3 deletions documentation/general/dotnet-run-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ The file-based build and run kicks in only when:

File-based programs are processed by `dotnet run` equivalently to project-based programs unless specified otherwise in this document.
For example, the remaining command-line arguments after the first argument (the target path) are passed through to the target app
(except for the arguments recognized by `dotnet run` unless they are after the `--` separator).
(except for the arguments recognized by `dotnet run` unless they are after the `--` separator)
and working directory is not changed (e.g., `cd /x/ && dotnet run /y/file.cs` runs the program in directory `/x/`).

## Entry points

Expand Down Expand Up @@ -170,8 +171,8 @@ Also, `InternalsVisibleTo` needs to be added into a C# file as an attribute, or

## Build outputs

Outputs are placed in a user-scoped directory (e.g., AppData on Windows) which might or might not be a temp directory,
under a subdirectory whose name is hashed file path of the entry point.
Build outputs are placed in a temp directory under a subdirectory whose name is hashed file path of the entry point
and which is restricted to the current user per [runtime guidelines][temp-guidelines].
Apart from keeping the source directory clean, this also avoids clashes of build outputs that are not project-scoped, like `project.assets.json`, in the case of multiple entry-point files.

## Directives for project metadata
Expand Down Expand Up @@ -319,3 +320,4 @@ Instead of implicitly including files from the target directory, the importing c
[artifacts-output]: https://learn.microsoft.com/dotnet/core/sdk/artifacts-output
[ignored-directives]: https://github.com/dotnet/csharplang/blob/main/proposals/ignored-directives.md
[shebang]: https://en.wikipedia.org/wiki/Shebang_%28Unix%29
[temp-guidelines]: https://github.com/dotnet/runtime/blob/d0e6ce8332a514d70b635ca4829bf863157256fe/docs/design/security/unix-tmp.md
0