. NET cross-platform Sake, KoreBuild, and sakekorebuild

Source: Internet
Author: User

. NET cross-platform Sake, KoreBuild, and sakekorebuild
 

I recently learned about cross-platform Asp.net Core 1.0 (also known as Asp. net5 \ Asp.net vNext) and found two new things: Sake and KoreBuild (or it has been running out for a long time ).

Most of the materials queried in a certain degree in China are copied and pasted, and there is almost no detailed introduction.

I had to look at the source code. Sake can go to Github to find the source code.

KoreBuild can be downloaded and installed through Nuget.

 

What are KoreBuild and Sake? What is their relationship with cross-platform platforms?

First, Sake

It is a weekend project for some people in the Asp.net vNext project team.

Msbuild does not support vNext project generation and compilation, so the Sake is created.

Sake needs to run on CLR. To run Sake in Linux, Mono (including MonoCLR) must be supported.

In addition, CoreCLR is not perfect yet. Maybe we can discard Mono in the near future.

The source code of sakethrough can be used to know whether msbu.exe is used in windows, and xbuild is used on other platforms.

Sake searches for the "src" folder by default in the current directory where the command is executed to compile the project under the folder.

The Sake project file also contains a bunch of. shade files, which are the execution scripts required for Sake generation and compilation.

KoreBuild is a management tool for Sake. It can be used to install the environment required for running Sake and other Sake.

It is also a part of the. shade file that Sake does not possess when executing compilation and generation.

Open the installation path of KoreBuild and find the KoreBuild. cmd file and KoreBuild. cmd, and push the shade file used by the Sake mentioned above.

As we all know

Cmd is a command file executed in windows;

Sh is the execution file of other operating systems.

The last line of the korebuild.htm file finds that the KoreBulid folder is passed as the include-dir parameter in the execution of sake.exe,

Explicitly specify the additional shade file set to be used by the Sake.

Parameters for executing sake.exe:

Usage: Sake [OPTIONS] + [target] +

Options:
-V, -- verbose increase verbosity
-H ,-?, -- Help show this message and exit
-F, -- file, -- makefile = VALUE read file as a makefile
-C, -- directory = VALUE change current directory
-I, -- include-dir = VALUE specifies a directory to search for sorted ded files

 

 

 

In addition, KoreBuild reads the script named makefile. shade by default as the first script to be executed by Sake and passes it through the-f parameter. Similar makefile. shade files are as follows:

The use-standard-lifecycle.shade mentioned in is included in the Sake project, while the k-standard-goals.shade is included in the KoreBuild.

If you want to add another project file to be compiled (not just the project under the src path), you can append it to The makefile. shade file.

Summary:

Sake is a C # cross-platform compiler that can run in any platform environment. the shade file (including its own or imported by calling parameters such as KoreBuild) compiles the asp.net core project for the execution script, and KoreBuild is a tool used to assist Sake in compiling.

 

I hope to point out the above errors.

 

Related information:

  • Building future. NET projects is quite pleasant
  • Compiling. NET Core code on Linux/OS X
  • An ASP. NET vNext Build and Repo Structure Braindump

 

Author: B. it
Source: http://www.cnblogs.com/ImBit/p/5307762.html
The copyright of this article is shared by the author and the blog. You are welcome to repost this article, but you must keep this statement without the author's consent and provide a connection to the original article on the article page.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.