Skip to content

Instantly share code, notes, and snippets.

@wags
Last active August 31, 2016 12:37
Show Gist options
  • Save wags/5debce01e799a818b953f89c13f3c8ba to your computer and use it in GitHub Desktop.
Save wags/5debce01e799a818b953f89c13f3c8ba to your computer and use it in GitHub Desktop.
.NET Core notes

.NET Core

Command line setup

dotnet new

dotnet restore

dotnet run

dotnet build

Install yo globally:

npm install yo -g

Install generator for aspnet:

npm install generator-aspnet -g

Generate something with the ASP.Net generator:

yo aspnet

(It will walk you through the steps) Select Web Application Select Bootstrap (3.3.6) Enter a name FunWithYo (bower install then runs automatically to install the required dependencies)

Output:

Your project is now created, you can use the following commands to get going
    cd "FunWithYo"
    dotnet restore
    dotnet build (optional, build will also happen when it's run)
    dotnet ef database update (to create the SQLite database for the project)
    dotnet run
    

You can then run dotnet restore within the FunWithYo directory. This will add all of the ASP.Net required libraries and NuGet packages for this newly generated project.

dotnet run starts listening on that project.

(Ctrl+C stops it)

Visual Studio Extensions

Download these extensions for a better development experience:

  • Web Essentials
  • Web Compiler
  • Add New File
  • Open Command Line
  • TypeScript (latest version... links to a download of a separate installer)

New project in Visual Studio

Create new project using ASP.NET Core Web Application (.NET Core) template, under Templates > Visual C#, Web.

Name it TheWorld

(leave create directory for solution un-checked)

Select Empty in the next dialog box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment