Skip to content

Commit

Permalink
Command line/command-line/command prompt updates (#2284)
Browse files Browse the repository at this point in the history
Command line/command-line/command prompt updates
  • Loading branch information
guardrex authored and tdykstra committed Dec 1, 2016
1 parent e3b4cf7 commit c2eef57
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ To highlight selected lines in a rendered snippet (usually renders as yellow bac

## Test your changes with DocFX

Test your changes with the [DocFX command line tool](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool), which creates a locally hosted version of the site. DocFX doesn't render style and site extensions created for docs.microsoft.com.
Test your changes with the [DocFX command-line tool](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool), which creates a locally hosted version of the site. DocFX doesn't render style and site extensions created for docs.microsoft.com.

DocFX requires the .NET Framework on Windows, or Mono for Linux or macOS.

### Windows instructions

* Download and unzip *docfx.zip* from [DocFX releases](https://github.com/dotnet/docfx/releases).
* Add DocFX to your PATH.
* In a command line window, navigate to the *aspnet* folder (which contains the *docfx.json* file) and run the following command:
* In a command-line window, navigate to the *aspnet* folder (which contains the *docfx.json* file) and run the following command:

```
docfx -t default --serve
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/client-side/bundling-and-minification.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Add `uglify` to minify your bundled JavaScript files and `cssmin` to minify your

[!code-js[Main](bundling-and-minification/samples/WebApplication1/src/WebApplication1/gulpfile.js?highlight=4,11&range=31-43)]

To run bundling and minification tasks from the command-line using gulp (`gulp min`), or you can also execute any of your gulp tasks from within Visual Studio using the **Task Runner Explorer**. To use the **Task Runner Explorer** select *gulpfile.js* in the Solution Explorer and then select **Tools > Task Runner Explorer**:
You can run bundling and minification tasks from a command prompt using gulp (`gulp min`), or you can also execute any of your gulp tasks from within Visual Studio using the **Task Runner Explorer**. To use the **Task Runner Explorer** select *gulpfile.js* in the Solution Explorer and then select **Tools > Task Runner Explorer**:

![image](bundling-and-minification/_static/task-runner-explorer.png)

Expand Down
8 changes: 4 additions & 4 deletions aspnetcore/client-side/yeoman.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ uid: client-side/yeoman

By [Steve Smith](http://ardalis.com), [Scott Addie](https://scottaddie.com), [Rick Anderson](https://twitter.com/RickAndMSFT), [Noel Rice](http://blog.falafel.com/author/noel-rice/), and [Shayne Boyer](https://twitter.com/spboyer)

[Yeoman](http://yeoman.io/) generates complete projects for a given set of client tools. Yeoman is an open-source tool that works like a Visual Studio project template. The Yeoman command line tool [yo](https://github.com/yeoman/yo) works alongside a Yeoman generator. Generators define the technologies that go into a project.
[Yeoman](http://yeoman.io/) generates complete projects for a given set of client tools. Yeoman is an open-source tool that works like a Visual Studio project template. The Yeoman command-line tool [yo](https://github.com/yeoman/yo) works alongside a Yeoman generator. Generators define the technologies that go into a project.

## Install Node.js, npm, and Yeoman

Expand All @@ -30,7 +30,7 @@ npm install -g yo bower

Note: If you get the error `npm ERR! Please try running this command again as root/Administrator.` on Mac OS, run the following command using [sudo](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/sudo.8.html): `sudo npm install -g yo bower`

From the command line, install the ASP.NET generator:
From a command prompt, install the ASP.NET generator:

```console
npm install -g generator-aspnet
Expand Down Expand Up @@ -108,13 +108,13 @@ When all the dependencies are restored, press **F5** to run the project. The def

You can prepare and host your web application using the [.NET Core](https://microsoft.com/net/core) command-line interface.

From the command line, change the current directory to the folder containing the project (that is, the folder containing the *project.json* file):
At a command prompt, change the current directory to the folder containing the project (that is, the folder containing the *project.json* file):

```console
cd src\MyWebApp
```

From the command line, restore the project's NuGet package dependencies:
Restore the project's NuGet package dependencies:

```console
dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/data/ef-mvc/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Run the application to verify that everything still works the same as before.

![Students Index page](migrations/_static/students-index.png)

## Command line interface (CLI) vs. Package Manager Console (PMC)
## Command-line interface (CLI) vs. Package Manager Console (PMC)

The EF tooling for managing migrations is available from .NET Core CLI commands or from PowerShell cmdlets in the Visual Studio **Package Manager Console** (PMC) window. In this preview version of the tooling, the CLI commands are more stable than the PMC cmdlets, so this tutorial shows how to use the .NET Core CLI commands.

Expand Down
8 changes: 4 additions & 4 deletions aspnetcore/fundamentals/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ uid: fundamentals/configuration

[Steve Smith](http://ardalis.com), [Daniel Roth](https://github.com/danroth27)

ASP.NET Core supports a variety of different configuration options. Application configuration data can come from files using built-in support for JSON, XML, and INI formats, as well as from environment variables, command line arguments or an in-memory collection. You can also write your own [custom configuration provider](xref:fundamentals/configuration#custom-config-providers).
ASP.NET Core supports a variety of different configuration options. Application configuration data can come from files using built-in support for JSON, XML, and INI formats, as well as from environment variables, command-line arguments or an in-memory collection. You can also write your own [custom configuration provider](xref:fundamentals/configuration#custom-config-providers).

[View or download sample code](https://github.com/aspnet/docs/tree/master/aspnetcore/fundamentals/configuration/sample)

Expand Down Expand Up @@ -52,7 +52,7 @@ The settings required by your application and the mechanism used to specify thos
## Using the built-in sources

The configuration framework has built-in support for JSON, XML, and INI configuration files, as well as support for in-memory configuration (directly setting values in code) and the ability to pull configuration from environment variables and command line parameters. Developers are not limited to using a single configuration source. In fact several may be set up together such that a default configuration is overridden by settings from another source if they are present.
The configuration framework has built-in support for JSON, XML, and INI configuration files, as well as support for in-memory configuration (directly setting values in code) and the ability to pull configuration from environment variables and command-line parameters. Developers are not limited to using a single configuration source. In fact several may be set up together such that a default configuration is overridden by settings from another source if they are present.

Adding support for additional configuration sources is accomplished through extension methods. These methods can be called on a `ConfigurationBuilder` instance in a standalone fashion, or chained together as a fluent API. Both of these approaches are demonstrated in the sample below.

Expand All @@ -76,11 +76,11 @@ When specifying files as configuration sources, you can optionally specify wheth
>[!WARNING]
> You should never store passwords or other sensitive data in configuration provider code or in plain text configuration files. You also shouldn't use production secrets in your development or test environments. Instead, such secrets should be specified outside the project tree, so they cannot be accidentally committed into the configuration provider repository. Learn more about [Working with Multiple Environments](environments.md) and managing [Safe storage of app secrets during development](../security/app-secrets.md).
One way to leverage the order precedence of `Configuration` is to specify default values, which can be overridden. In the console application below, a default value for the `username` setting is specified in an in-memory collection, but this is overridden if a command line argument for `username` is passed to the application. You can see in the output how many different configuration sources are configured in the application at each stage of its execution.
One way to leverage the order precedence of `Configuration` is to specify default values, which can be overridden. In the console application below, a default value for the `username` setting is specified in an in-memory collection, but this is overridden if a command-line argument for `username` is passed to the application. You can see in the output how many different configuration sources are configured in the application at each stage of its execution.

[!code-none[Main](../fundamentals/configuration/sample/src/ConfigConsole/Program.cs?highlight=22,25)]

When run, the program will display the default value unless a command line parameter overrides it.
When run, the program will display the default value unless a command-line parameter overrides it.

![image](configuration/_static/config-console.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static void Main(string[] args)
Console.WriteLine("Added Memory Source. Sources: " + builder.Sources.Count());

builder.AddCommandLine(args);
Console.WriteLine("Added Command Line Source. Sources: " + builder.Sources.Count());
Console.WriteLine("Added Command-line Source. Sources: " + builder.Sources.Count());

var config = builder.Build();
string username = config["username"];
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/fundamentals/hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static void Main(string[] args)
}
```

In the example above, command line arguments may be passed in to configure the host, or configuration settings may optionally be specified in a *hosting.json* file. To specify the host run on a particular URL, you could pass in the desired value from the command line:
In the example above, command-line arguments may be passed in to configure the host, or configuration settings may optionally be specified in a *hosting.json* file. To specify the host run on a particular URL, you could pass in the desired value from a command prompt:

```none
dotnet run --urls "http://*:5000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ namespace AspNetCoreModuleDemo
public class Program
{
// The default listening address is http://localhost:5000 if none is specified.
// You can use the --urls command line flag to change the listening address when
// You can use the --urls command-line flag to change the listening address when
// running without IIS. Example:
// > dotnet run --urls http://localhost:8080

// Use the following code to configure URLs in code:
// builder.UseUrls("http://localhost:8080");
// Put it after UseConfiguration(config) to take precedence over
// command line configuration. IIS config will take precedence over
// command-line configuration. IIS config will take precedence over
// UseUrls.
#region snippet_Main
public static int Main(string[] args)
Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/fundamentals/servers/kestrel/sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public class Program

// The default listening address is http://localhost:5000 if none is specified.
// Replace "localhost" with "*" to listen to external requests.
// You can use the --urls command line flag to change the listening address. Ex:
// You can use the --urls command-line flag to change the listening address. Ex:
// > dotnet run --urls http://*:8080;http://*:8081

// Use the following code to configure URLs in code:
// builder.UseUrls("http://*:8080", "http://*:8081");
// Put it after UseConfiguration(config) to take precedence over command line configuration.
// Put it after UseConfiguration(config) to take precedence over command-line configuration.

#region snippet_Main
public static int Main(string[] args)
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/fundamentals/servers/weblistener.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ There are also [Http.Sys registry settings](https://support.microsoft.com/en-us/

* Configure URLs and ports to listen on

By default ASP.NET Core binds to `http://localhost:5000`. To configure URL prefixes and ports, you can use the `UseURLs` extension method, the `urls` command line argument or the ASP.NET Core configuration system. For more information, see [Hosting](../../fundamentals/hosting.md).
By default ASP.NET Core binds to `http://localhost:5000`. To configure URL prefixes and ports, you can use the `UseURLs` extension method, the `urls` command-line argument or the ASP.NET Core configuration system. For more information, see [Hosting](../../fundamentals/hosting.md).

Web Listener uses the [Http.Sys prefix string formats](https://msdn.microsoft.com/library/windows/desktop/aa364698.aspx). There are no prefix string format requirements that are specific to WebListener.

Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/fundamentals/servers/weblistener/sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

// The default listening address is http://localhost:5000 if none is specified.
// Replace "localhost" with "*" to listen to external requests.
// You can use the --urls command line flag to change the listening address. Ex:
// You can use the --urls command-line flag to change the listening address. Ex:
// > dotnet run --urls http://*:8080;http://*:8081

// Use the following code to configure URLs in code:
// builder.UseUrls("http://*:8080", "http://*:8081");
// Put it after UseConfiguration(config) to take precedence over command line configuration.
// Put it after UseConfiguration(config) to take precedence over command-line configuration.

namespace WebListenerDemo
{
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/hosting/apppool.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To grant the IIS worker process access to your application, you will need to mod

6. Click the **Check Names** button and then click **OK**.

You can also do this via the command-line by using **ICACLS** tool.
You can also do this via a command prompt by using **ICACLS** tool.

<!-- literal_block {"ids": [], "classes": ["code", "bat"], "xml:space": "preserve"} -->

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/mobile/native-mobile-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The application should respond to all requests made to port 5000. Update *Progra
[!code-csharp[Main](native-mobile-backend/sample/ToDoApi/src/ToDoApi/Program.cs?range=10-16&highlight=3)]

> [!NOTE]
> Make sure you run the application directly, rather than behind IIS Express, which ignores non-local requests by default. Run `dotnet run` from the command line, or choose the application name profile from the Debug Target dropdown in the Visual Studio toolbar.
> Make sure you run the application directly, rather than behind IIS Express, which ignores non-local requests by default. Run `dotnet run` from a command prompt, or choose the application name profile from the Debug Target dropdown in the Visual Studio toolbar.
Add a model class to represent To-Do items. Mark required fields using the `[Required]` attribute:

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/publishing/apache-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The output should reflect something similar to the following.
```

> [!NOTE]
> In this example the output reflects httpd.86_64 since the CentOS 7 version is 64 bit. The output may be different for your server. To verify where Apache is installed, run `whereis httpd` from the command line.
> In this example the output reflects httpd.86_64 since the CentOS 7 version is 64 bit. The output may be different for your server. To verify where Apache is installed, run `whereis httpd` from a command prompt.
### Configure Apache for reverse proxy

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/publishing/web-publishing-vs.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The image above shows the three main extension points, you’re most likely to u

2. Customize `dotnet publish`

As stated previously `dotnet publish` is a command line utility that can be used to help publish your ASP.NET Core application. This is a cross platform command line utility (that is, you can use it on Windows, Mac or Linux) and does not require Visual Studio. If you are working on a team in which some developers are not using Visual Studio, then you may want to script building and publishing. When `dotnet publish` is executed it can be configured to execute custom commands before or after execution. The commands will be listed in project.json in the scripts section.
As stated previously `dotnet publish` is a command-line utility that can be used to help publish your ASP.NET Core application. This is a cross platform command-line utility (that is, you can use it on Windows, Mac or Linux) and does not require Visual Studio. If you are working on a team in which some developers are not using Visual Studio, then you may want to script building and publishing. When `dotnet publish` is executed it can be configured to execute custom commands before or after execution. The commands will be listed in project.json in the scripts section.

The supported scripts for publish are prepublish and postpublish. The ASP.NET Core Web Application template uses the prepublish step by default. The relevant snippet from *project.json* is shown below.

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/tutorials/publish-to-azure-webapp-using-vs.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You can fix the problem in two different ways:

* Tap **Apply Migrations** and, once the page updates, refresh the page; or

* Run the following from the command line in the project's directory:
* Run the following from a command prompt in the project's directory:

<!-- literal_block {"ids": [], "xml:space": "preserve"} -->

Expand Down

0 comments on commit c2eef57

Please sign in to comment.