Skip to content

Instantly share code, notes, and snippets.

@DanielLoth
Created January 10, 2018 00:23
Show Gist options
  • Select an option

  • Save DanielLoth/2aaeac480cb9f7d09d9d9c1af5de5218 to your computer and use it in GitHub Desktop.

Select an option

Save DanielLoth/2aaeac480cb9f7d09d9d9c1af5de5218 to your computer and use it in GitHub Desktop.
dotnet core project generation
dotnet new mvc -o MyProject
cd MyProject
REM CodeGenerators.Mvc added as package
dotnet add package "Microsoft.VisualStudio.Web.CodeGeneration.Design"
dotnet add package "Microsoft.VisualStudio.Web.CodeGenerators.Mvc"
REM CodeGeneration.Tools added as reference (not package) as it is tooling.
dotnet add reference "Microsoft.VisualStudio.Web.CodeGeneration.Tools"
dotnet aspnet-codegenerator controller --controllerName MyController --useAsyncActions --readWriteActions --useDefaultLayout --relativeFolderPath Controllers --controllerNamespace MyNamespace
dotnet build
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment