From 7f1b742958f825ebb26184f5da61c542cd61b9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?VERNOU=20C=C3=A9dric?= <1659796+vernou@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:36:19 +0200 Subject: [PATCH 1/2] fix example to run from csproj --- docs/standard/commandline/get-started-tutorial.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/standard/commandline/get-started-tutorial.md b/docs/standard/commandline/get-started-tutorial.md index 38e1df67c6e1a..760aac6f1da4d 100644 --- a/docs/standard/commandline/get-started-tutorial.md +++ b/docs/standard/commandline/get-started-tutorial.md @@ -93,9 +93,11 @@ You can use any of the following ways to test while developing a command-line ap * Use `dotnet run` and pass option values to the app instead of to the `run` command by including them after `--`, as in the following example: ```dotnetcli - dotnet run -- --file scl.runtimeconfig.json + dotnet run -- --file bin/Debug/net6.0/scl.runtimeconfig.json ``` +> The working directory is the csproj folder, so the relative path to `scl.runtimeconfig.json` is from the csproj folder. + In .NET 7.0.100 SDK Preview, you can use the `commandLineArgs` of a *launchSettings.json* file by running the command `dotnet run --launch-profile `. * [Publish the project to a folder](../../core/tutorials/publishing-with-visual-studio-code.md), open a command prompt to that folder, and run the executable: From d30804cc3e78dc9ce59e572fa677ff074052a4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?VERNOU=20C=C3=A9dric?= <1659796+vernou@users.noreply.github.com> Date: Fri, 19 Jul 2024 00:03:11 +0200 Subject: [PATCH 2/2] Improve for clarification Co-authored-by: Tom Dykstra --- docs/standard/commandline/get-started-tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/standard/commandline/get-started-tutorial.md b/docs/standard/commandline/get-started-tutorial.md index 760aac6f1da4d..6e5f6e4ef8655 100644 --- a/docs/standard/commandline/get-started-tutorial.md +++ b/docs/standard/commandline/get-started-tutorial.md @@ -96,7 +96,7 @@ You can use any of the following ways to test while developing a command-line ap dotnet run -- --file bin/Debug/net6.0/scl.runtimeconfig.json ``` -> The working directory is the csproj folder, so the relative path to `scl.runtimeconfig.json` is from the csproj folder. +The working directory is the project folder (the folder that has the .csproj file), so the relative path to `scl.runtimeconfig.json` is from the project folder. In .NET 7.0.100 SDK Preview, you can use the `commandLineArgs` of a *launchSettings.json* file by running the command `dotnet run --launch-profile `.