Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze Sake and KoreBuild in .NET Cross-platform

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to analyze Sake and KoreBuild in. NET cross-platform, the content is very detailed, interested partners can refer to it, I hope it can help you.

Recently, while learning about ASP.NET Core 1.0 (also known as Asp.net5\Asp.net vNext) across platforms, two new things were discovered: Sake and KoreBuild (or have been around for a long time).

Through a certain degree of domestic query information is mostly copied paste to, almost no detailed introduction.

Just look at the source code, Sake can go to Github to find the source code.

KoreBuild can be downloaded and installed via Nuget.

What are KoreBuild and Sake? What do they have to do with cross-platform?

First, Sake.

It's a weekend project for someone on the ASP.NET vNext project team.

Sake was created because msbuild was not too friendly to build vNext projects.

Sake needs to run on CLR. If Sake wants to run on Linux, Mono (including MonoCLR) support is required.

In addition, CoreCLR is not perfect at present, perhaps in the near future, we can completely abandon Mono.

Through the following Sake source code can know it in the Windows environment or is called msbulid.exe, in other platforms using the xbuild tool to generate.

Sake looks for a folder named src by default in the current directory where the command is executed, and compiles the items under that folder

Sake's own project files also include a bunch of.shade files, which are the execution scripts needed to generate and compile Sake.

KoreBuild itself is both a Sake management tool and can be used to install Sake and other Sake environments.

Sake can also provide a part of the.shade file that Sake does not have when compiling and generating.

Open the KoreBuild installation path and find KoreBuild.cmd and KoreBuild.cmd files, as well as a shade file for Sake mentioned above.

well known

cmd is a command file executed in the windows environment;

sh is an executable file under another OS.

Through the last line of KoreBuild.cmd file found in the execution of Sake.exe KoreBulid folder as include-dir parameter passed in

Explicitly specify the set of extra shade files Sake wants to use.

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 included files

In addition, KoreBuild will read a script named makefile.shade by default as the script Sake will execute first, passed through the-f parameter, similar makefile.shade file is as follows

The use-standard-lifecycle.shade mentioned in this is included under Sake, and the k-standard-goals.shade is included under KoreBuild.

If you want to add additional files to your project that need to be compiled (not just those in src), you can append them to the makefile.shade file

Sake is a C#cross-platform compiler that can run on any platform environment, compiling ASP.NET core projects with.shade files (included in itself or passed through call parameters such as KoreBuild) for execution scripts, and KoreBuild is a tool to assist Sake in compiling.

About how to analyze. NET cross-platform Sake and KoreBuild shared here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report