Run the C # program out of the. NET Framework (non-Apsara stack)

Source: Internet
Author: User

I have read a lot about running C # Out of the Framework in the past few days #ProgramOfArticleAll the same, they talk about the Feixin solution. This solution involves some legal issues and can only be studied by yourself. Later, I searched it on Google's U.S. website, read some articles, and accidentally found mono, I used the mono keyword to search Google China again. Someone has implemented console program disconnection.. NET Framework.

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. 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-1.9.1.

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 one.CodeIf you are interested, you can study that the 7zip package is only 3.26 MB, but the installation of Microsoft's huge framework is not required. 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-1.9.1 \ 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-1.9.1 \ bin \ mono.exe can be successfully executed! What is missing?

The size of a single file in the blog Park is limited to 1.95 MB. I tried it many times but it was not successful. You can download it on my csdn. There are no resources.

Http://download.csdn.net/source/661248

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.