yo指的是Yeoman 官网:
因为安装yo需要nmp 因此 要先到node下载node并按装
安装之后就可以下一步了
$ npm install -g yo generator-aspnet
安装之后就可以用yo aspnet来生成.net项目
控制台命令是
yo aspnet
接下来出现如下页面可供选择
选择之后会出现如下页面 让你填写项目名称
填写之后 回车 就生成对应的项目
然后就是
dotnet restoredotnet builddotnet run
当然最主要的是你可用 yo aspnet 创建class等
创建class的命令如下
yo aspnet:class person
更多命令 可用以下命令获取帮助
yo aspnet --help
yo aspnet:angularcontroller [options]yo aspnet:angularcontrolleras [options] yo aspnet:angulardirective [options] yo aspnet:angularfactory [options] yo aspnet:angularmodule [options] yo aspnet:appsettings [options] yo aspnet:bowerjson [options] yo aspnet:class [options] yo aspnet:coffeescript [options] yo aspnet:dockerfile [options] yo aspnet:gitignore [options] yo aspnet:gruntfile [options] yo aspnet:gulpfile [options] yo aspnet:htmlpage [options] yo aspnet:interface [options] yo aspnet:javascript [options] yo aspnet:json [options] yo aspnet:jsonschema [options] yo aspnet:middleware [options] yo aspnet:mvccontroller [options] yo aspnet:mvcview [options] yo aspnet:nuget [options] yo aspnet:packagejson [options] yo aspnet:program [options] yo aspnet:startup [options] yo aspnet:stylesheet [options] yo aspnet:stylesheetless [options] yo aspnet:stylesheetscss [options] yo aspnet:taghelper [options] yo aspnet:textfile [options] yo aspnet:tfignore [options] yo aspnet:typescript [options] yo aspnet:typescriptconfig [options] yo aspnet:typescriptjsx [options] yo aspnet:usersecrets [options] yo aspnet:webapicontroller [options]
参考: