A few simple steps to improve the development efficiency of. Net Core,. netcore
How does one add an IIS process?
In the past, when developing ASP. NET (MVC) projects, we chose to use IIS to speed up program startup (Adjustment. Use IIS to set up projects that are still under development and add processes when you need to adjust them. In more cases, it is easier and faster to adjust CSS, HTML, and JS, instead of pressing F5 in Visual Studio every time, you only need to press F5 in the browser to refresh. However, to. Net Core, this trick is useless (maybe my posture is wrong ).
Add dotnet process mode
Run your program directly using the dotnet command (the dotnet startup is really fast ). Add a batch in your project folder, such as Run. cmd.
Open Run. cmd and enter the following command. Modify the settings as per your project.
@echo offecho ASPNETCORE_ENVIRONMENT=Developmentset ASPNETCORE_ENVIRONMENT=Developmentdotnet bin/Debug/netcoreapp2.0/ZKEACMS.WebHost.dll
Initially, dotnet run was directly used, but it was found to be slow to start.
Mr Cheng (ctrl + shift + B) Click the project, and double-click the batch to run. Is it very fast? You can immediately refresh it in the browser to see if the latest modification is Work, if you do not Work, debug immediately.
Tip: Press ctrl + alt + p to open the append process. After an append operation, you can use shift + alt + p to append the process again.
Every time you double-click Run. cmd in the directory, it seems a little too much trouble. If you can directly execute it under Visual Studio.
Open Command Line plug-in
Install the plug-in Open Command Line in Visual Studio.
After the installation is complete, right-click Run. cmd in the project, which is much more convenient.
If you don't want to use this batch, use this.
Others
Upgrade Vsual Studio 15.3 ,. net core 2.0 and later found that every generation will perform restore detection. Although it is very fast, it is still a waste of time. After all, the package reference will not change frequently, so turn it off. This increases the Build speed.
Is the Nuget package recovery slow? Add the nuget server in the blog Park. Don't forget to move it to the top.
https://nuget.cnblogs.com/v3/index.json