diff --git a/aspnet/client-side/yeoman.rst b/aspnet/client-side/yeoman.rst index ae995d4a79..c254bffab2 100644 --- a/aspnet/client-side/yeoman.rst +++ b/aspnet/client-side/yeoman.rst @@ -18,17 +18,17 @@ The Yeoman command line tool **yo** works alongside a Yeoman generator. Generato - You can even `generate your own Yeoman generator `_. In this article: - - `Getting Started`_ - - `Building and Running from Visual Studio`_ - - `Client-Side Build Support`_ - - `Restoring, Building and Hosting from the Command Line`_ - - `Adding to Your Project with Sub Generators`_ - + - `Getting Started`_ + - `Building and Running from Visual Studio`_ + - `Client-Side Build Support`_ + - `Restoring, Building and Hosting from the Command Line`_ + - `Adding to Your Project with Sub Generators`_ + Getting Started --------------- The `ASPNET generator `_ creates ASP.NET 5, DNX projects that can be loaded into Visual Studio 2015 or run from the command line. The generator creates the following project types: - + - Empty Application: An empty Web application with minimal dependencies. - Console Application: A DNX-based console application. - Web Application: A complete MVC web application with a simple home page and examples for managing accounts and login. @@ -38,9 +38,9 @@ be loaded into Visual Studio 2015 or run from the command line. The generator cr This walk-through demonstrates how to use Yeoman to generate an ASP.NET 5 web application. -1. Follow the instructions on http://yeoman.io/learning/ to install **yo** and other required tools. +1. Follow the instructions on http://yeoman.io/learning/ to install **yo** and other required tools. -2. On the command line, install the ASP.NET generator: +2. On the command line, install the ASP.NET generator: .. code-block:: console @@ -48,29 +48,29 @@ This walk-through demonstrates how to use Yeoman to generate an ASP.NET 5 web ap .. note:: The **–g** flag installs the generator globally so that you can use it from any path on your system. -3. Make a new directory where your project will be generated: +3. Make a new directory where your project will be generated: .. code-block:: console mkdir c:\MyYo -4. On the command line, make the new directory the current directory. +4. On the command line, make the new directory the current directory. .. code-block:: console cd c:\MyYo -5. Run the ``yo`` command and pass the name of the generator. +5. Run the ``yo`` command and pass the name of the generator. .. code-block:: console yo aspnet -6. The aspnet generator displays a menu. Select the **Web Application** and press ``Enter``. +6. The aspnet generator displays a menu. Select the **Web Application** and press ``Enter``. .. image:: yeoman/_static/yeoman-yo-aspnet.png -7. Provide an application name "MyWebApp" and press ``Enter``. +7. Provide an application name "MyWebApp" and press ``Enter``. .. image:: yeoman/_static/yeoman-yo-aspnet-appname.png @@ -138,25 +138,24 @@ You can prepare and host your web application using commands **dnu** (Microsoft .. code-block:: console - dnx . web + dnx web -The web server will listen on port 5000. The URL and port are defined in project.json in the **commands** section. +The web server will listen on port 5000. The URL and port are defined in the hosting.ini file, which is referenced by the **commands** section of the project.json file. -.. code-block:: json - :emphasize-lines: 2 +.. code-block:: c# + :linenos: + :emphasize-lines: 3 - "commands": { - "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000", - "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001", - "gen": "Microsoft.Framework.CodeGeneration", - "ef": "EntityFramework.Commands" - }, + "commands": { + "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --config hosting.ini", + "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini" + }, 5. Open a web browser and navigate to http://localhost:5000. .. image:: yeoman/_static/yeoman-home-page_5000.png -.. note:: You can also run the cross-platform Kestrel development server using the **dnx . kestrel** command. By default, Kestrel listens on port 5001 as defined in the **project.json**, **commands** section. +.. note:: You can also run the cross-platform Kestrel development server using the **dnx kestrel** command. Adding to Your Project with Sub Generators ------------------------------------------ diff --git a/aspnet/dnx/overview.rst b/aspnet/dnx/overview.rst index 0f472cb3fa..8a7cb1cb87 100644 --- a/aspnet/dnx/overview.rst +++ b/aspnet/dnx/overview.rst @@ -84,7 +84,7 @@ A command is a named execution of a .NET entry point with specific arguments. Yo You can then use DNX to execute the commands defined by your project, like this:: - dnx . web + dnx web Commands can be built and distributed as NuGet packages. You can then use DNU to install commands globally on a machine:: diff --git a/aspnet/fundamentals/owin.rst b/aspnet/fundamentals/owin.rst index 1902256429..13e21e7898 100644 --- a/aspnet/fundamentals/owin.rst +++ b/aspnet/fundamentals/owin.rst @@ -81,7 +81,7 @@ With this in place, all that's required to run an ASP.NET application using this :language: javascript :lines: 1-15 -When run, this command (equivalent to running ``dnx . web`` from a command line) will search for a package called "NowinSample" that contains an implementation of ``IServerFactory``. If it finds one, it will initialize and start the server as detailed above. Learn more about the built-in ASP.NET :doc:`/fundamentals/servers`. +When run, this command (equivalent to running ``dnx web`` from a command line) will search for a package called "NowinSample" that contains an implementation of ``IServerFactory``. If it finds one, it will initialize and start the server as detailed above. Learn more about the built-in ASP.NET :doc:`/fundamentals/servers`. Run ASP.NET 5 on an OWIN-based server and use its WebSockets support -------------------------------------------------------------------- diff --git a/aspnet/fundamentals/servers/sample/ServersDemo/src/ServersDemo/Program.cs b/aspnet/fundamentals/servers/sample/ServersDemo/src/ServersDemo/Program.cs index c0918fe0d6..42d3f8bc16 100644 --- a/aspnet/fundamentals/servers/sample/ServersDemo/src/ServersDemo/Program.cs +++ b/aspnet/fundamentals/servers/sample/ServersDemo/src/ServersDemo/Program.cs @@ -7,7 +7,7 @@ namespace ServersDemo { /// /// This demonstrates how the application can be launched in a console application. - /// "dnx . run" command in the application folder will invoke this. + /// Executing the "dnx run" command in the application folder will run this app. /// public class Program { diff --git a/mvc/tutorials/mvc-with-entity-framework.rst b/mvc/tutorials/mvc-with-entity-framework.rst index b9e42a4eda..0707fceec0 100644 --- a/mvc/tutorials/mvc-with-entity-framework.rst +++ b/mvc/tutorials/mvc-with-entity-framework.rst @@ -177,8 +177,8 @@ Open a command prompt in the project directory (ContosoBooks/src/ContosoBooks) a .. code-block:: none dnvm use 1.0.0-beta5 - dnx . ef migration add Initial - dnx . ef migration apply + dnx ef migration add Initial + dnx ef migration apply The "``add Initial``" command adds code to the project that allows EF to update the database schema. The "``apply``" command creates the actual database. After you run the run these commands, your project has a new folder named *Migrations*: @@ -190,7 +190,7 @@ The "``add Initial``" command adds code to the project that allows EF to update Adding C:\\Users\\\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta5\\bin to process PATH -- **dnx . ef migration add Initial** : `DNX `_ is the .NET Execution Environment. The ``ef migration apply`` command runs pending migration code. For more information about ``dnvm``, ``dnu``, and ``dnx``, see :ref:`DNX Overview `. +- **dnx ef migration add Initial** : `DNX `_ is the .NET Execution Environment. The ``ef migration apply`` command runs pending migration code. For more information about ``dnvm``, ``dnu``, and ``dnx``, see :ref:`DNX Overview `. Add an index page ----------------- diff --git a/mvc/views/view-components.rst b/mvc/views/view-components.rst index 47fdae6e4d..0fe59c3700 100644 --- a/mvc/views/view-components.rst +++ b/mvc/views/view-components.rst @@ -55,7 +55,7 @@ Download the ASP.NET 5 starter project .. code-block:: none dnvm use 1.0.0-beta5 - dnx . ef migration apply + dnx ef migration apply - **dnvm** : The .NET Version Manager, a set of command line utilities that are used to update and configure .NET Runtime. The command ``dnvm use 1.0.0-beta5`` instructs the .NET Version Manager to add the 1.0.0-beta5 version of the ASP.NET 5 runtime to the ``PATH`` environment variable for the current shell. For ASP.NET 5 Beta 5, the following is displayed: @@ -64,7 +64,7 @@ Download the ASP.NET 5 starter project Adding C:\\Users\\\\.dnx\\runtimes\\dnx-clr-win-x86.1.0.0-beta5\\bin to process PATH - `DNX `_ is the .NET Execution Environment. -- **dnx . ef migration add Initial** : `DNX `_ is the .NET Execution Environment. The ``ef migration apply`` command runs pending migration code. +- **dnx ef migration add Initial** : `DNX `_ is the .NET Execution Environment. The ``ef migration apply`` command runs pending migration code. Run the app ^^^^^^^^^^^^^^^^^^^^^