Original article: http://www.cnblogs.com/daylight/archive/2008/10/02/1303037.html
It is actually used for mono's public language runtime. The advantage of this is that the release is free of installation. First, you need to download the latest mono version (currently 2.0.1 ). Bytes.
1. Use Visual Studio to create a Windows application named winapp and add a button.
2. compile the project to a winapp.exe file.
3. Create a winapp folder, and create the bin and Lib folders.
4. copy the files in the bin and Lib subfolders of the mono installation folder to the two folders you just created. The default mono installation path is c: \ Program Files \ mono-2.0.
5. Add the EXE file to the winapp folder.
6. Call, which can be called by using bat batch processing, bin \ mono.exe winapp.exe. (In fact, it is best to write a small program called VC ++, but I have never learned VC ++)
Okay, send a code. If you are interested, you can study it. After 7 zip is packaged, it is only 3.26 MB, But it achieves a huge framework without installing Microsoft. I have tested this test project on both pure virtual machines and local machines, but there is a bug that mono does not support the Chinese path well. If there is a Chinese path, Mono cannot run. Later, I tried to use c: \ Program Files \ mono-2.0 \ bin \ mono.exe for execution, so there is no Chinese path problem. I think the missing file is one by one copied to the winapp folder and executed in batches. Later, I simply moved all the files in the entire installation directory to the winapp directory and failed to execute batch processing. However, C: \ Program Files \ mono-2.0 \ bin \ mono.exe can be successfully executed! What is missing?