Linux. NET in green -- "Jws. Mono" (continued), linux. netjws. mono
In the previous article, we briefly introduced the installation and use of jws. mono, and how to manually create jws. mono.
Several days after the article was published, I always felt a bit inappropriate until I suddenly realized that we were doing jws on our own. mono can see the info page, but in fact it cannot mount any.. NET site. Therefore, it is necessary to write down this article to fill in the previous omissions.
Go to the topic of this section. In this section, we will focus on:
(1) analyze the composition of jws. mono and the functions of related components
(2) mono: bin directory details
1. Composition and introduction of jws. mono
In general, jws. mono contains two parts: jexus and mono that provides its runtime environment. The following figure shows the components of unzip jws.mono.tar.gz. (Note: This article focuses on the jws. mono downloaded from the previous article. Other structures may be different ):
Directly start the analysis. As shown in, the root directory of jws. mono contains four directories. Their functions are as follows:
Bin: directory of executable files containing the Mono Compiler
Etc: directory containing the default. NET configuration file (such as machine. config)
Jexus: directory of jexus
Lib: contains the. NET assembly, the so library file obtained by compiling mono and libgdiplus.
The directory and structure are probably like this. After you click to enter the relevant directory, you will be familiar with it.
2. bin directory explanation
Click to enter the bin directory:
If you compare the compiled mono/bin directory, the bin directory here is much more lightweight. Yes, the bin directory here is cropped and only contains provided. NET core components required for running, there is nothing more. Mono-sgen is generated, and the rest are composed of scripts. dmcs, gmcs, and mcs provide program calls for FramWork versions 4.0, 2.0 (3.5), and 4.5 respectively.
Use VIM to open a script file:
Only one command is included. The command is used to call mono under the same directory and specify its framework version.
Back to the file directory, let's take a closer look at the size of the file "mono" (interested readers can look at their own compiled Linux. the size of the executable file "mono" in. NET is very different. The size is only 1 kb. Obviously, this file called "mono" will never be the "mono" compiler ", it's just a file with the same name.
As I mentioned earlier, except mono-sgen, the rest are script files, so we can continue to open it with Vim:
At this point, we can see at a glance that the role of this "mono" file is to first set and load it with Linux.. NET Running related resource files (assembly files, machine. (mono-sgen contains the JIT and sgen garbage collection components of mono-Sgen ).
This file is very important for all of us.. NET programs must run through this file. Therefore, if any errors occur in the parameters (such as directories) in this file, it will lead to our.. NET program cannot be compiled and run.
Pay attention to "-- runtime". Here, no matter which version of the framework library you are using, it is actually in jws. framework 4.0 is used for mono Runtime (in fact, the popular CLR versions include 2.0 and 4.0, while in mono, CLR 4.0 is a database compatible with CLR 2.0, MS.. NET ).
Back to the starting point. At the beginning, I mentioned the question. Do you know why?
LinuxNET configuration error in apache + ubuntu + xsp + mono
Take a look at web. config authentication.