In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces how to create an ASP.NET 5 project through the command line and sublime. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Today I'll tell you how to create your ASP.NET 5 project. Or get used to using the Visual Studio template (as shown below), which is readily available to you. But now I prefer to generate ASP.NET 5 projects through command-line scripts, along with Sublime to do all the coding work.
Next, start creating the project. If you are on Mac/Linux/Windows and you want to create an ASP.NET project from the command line, you can install Yeoman.
What is Yeoman?
Developed by Google's team and a team of external contributors, Yeoman aims to create an easy-to-use workflow for developers through the packaging of Grunt (a command-line tool for developing task automation) and Bower (a package manager for front-end resources such as HTML, CSS, Javascript, and images). Yeoman mainly consists of three parts: yo (scaffolding tool), grunt (build tool), and bower (package manager). These three tools are developed independently, but need to be used together to achieve our efficient workflow pattern. In addition to solving the workflow pattern, it also solves the dependencies between packages and packages in the project. Take a look at the picture below and you can see how these three modules work.
Configure Yeoman on Mac, as long as you configure node.js and npm.
Install Yeoman from the following command line
Npm install-g yo / / install Yeoman via npm
Npm install-g generator-aspnet / / install the development templates supported by Yeoman. Here is the template support for installing ASP.NET 5.
After completing the above two steps, you can build the ASP.NET 5 project from the command line.
Open the command line on Mac, of course, ComandLine / Windows is cmd, and then type yo aspnet, and you will see several projects shown in the following figure
Ha ha, in addition to the traditional 5-piece set (Empty/Console/Web/WebAPI/ClassLibrary), there is also brother Yi's favorite Nancy. Then you just need to move the cursor up and down and press the keys to select what you want. To tell you the truth, create a project through the command line, and B grid will be promoted quickly.
I am here to create a Web Application as an example, the cursor to select Web Application press enter, it will ask you the name of the project, you can enter to create the project. )
Then you can compile and run your Web Application project by typing three commands
1. Kpm restore restores the packages you need for your project and their dependencies
2. Kpm build recompilation
3. K kestrel / k web runs your Web project locally, note here that kestrel is for the Mac/Linux platform and web is on the Windows platform.
These three orders happen to reflect on the four Ks of yesterday. Oh, forget it. let's call it DN.
After all, the command line is the command line, when you need to edit the project, especially in the case of non-Windows platform, you still need an IDE, I still recommend Sublime. You can also use Vim, depending on your personal preference.
Sublime Text development ASP.NET 5 environment configuration
Of course, you need a Sublime this is not expensive to buy, buy multiple platforms at a time, for the need to work will not be so bad. The advantage of Sublime Text is that there are many plug-ins, if you need to install, you must first install Package Control Plugin, because this is necessary. Equal to a plug-in support. Refer to this for details (click on the open link).
After the installation is successful, you can install ASP.NET 5 support through Package Control, thanks to open source. This bag is called Kulture. Installation steps are not detailed, follow this link to go step by step (click on the open link), restart Sublime, pull the project folder into Sublime, you can use Mac on Cmd+Shit+P/Windows on Ctrl+Shit+P, and then select Run K Command to call Kulture to compile and run your ASP.NET 5 project.
You will miss Visual Studio's IntelliSense, and of course Sublime will have a corresponding plug-in-Omnisharp (click on the open link). All right, through Sublime+Kulture + Omnisharp so that equipped with a clear level of ASP.NET 5 operating environment can easily do your work under Sublime.
On how to create an ASP.NET 5 project through the command line and sublime to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.