AnyExec enables your. NET program to run on Linux

Source: Internet
Author: User

AnyExec enables your. NET program to run on Linux

To run the. NET application on Linux, a common practice is to install mono on Linux and run the program using the "mono your.exe" command.

This method of running the. net program has two weaknesses: one is to install mono on the client and the other is mono xx.exe. This command line is always a little unprofessional.

So, is there a way to neither install mono nor allow your. NET program to run directly on Linux like a C language program?

To solve this problem. net programs, especially. the ease of deploying and running the net console program on the Linux platform. I have prepared a small tool named "AnyExec" for you. The following describes how to deploy and run the program. the net program is integrated with AnyExec to form a program system that can run independently on the Linux platform without installing mono.

I. preparation:

1. Because currently only 64-bit AnyExec is available, you need to prepare a 64-bit Linux testing machine.

2. Download anyexec. Run the command wget http://linuxdot.net/down/anyexec-1.1-linux_x64.tar.gz on a Linux Tester

3. decompress the package. Run the unzip command: tar-zxvf anyexec-1.1-linux_x64.tar.gz

4. Change the name of the folder such as "anyexec-1.1-linux_x64" to the name you need, such as myprog. The command is mv anyexec-1.1-linux_x64 myprog.

Then go to myprog and run the ls command to view a program file named any and three folders named app, lib, and bin.

You can try to run any. If the following information is displayed, AnyExec can work properly on your system.

Ii. Integration:

1. Prepare a. NET console program. If not, you can create a new one. For example, I use VS to create a console file named myprog. For. NET, select 4.0 or 4.5.

Content:

Then compile the exe file.

2. Upload the exe file to the sub-folder named "app" under the anyexec folder (that is, you have renamed it myprog folder.

3. Rename the executable file named "any" to make the new file name consistent with the exe file name (excluding the extension) You uploaded to the app folder, for example: myprog

4. Trial run:

Now, you can try to run a linux program named "any" with the same name as your program (such as myprog.

3. Package and release:

Through the above steps, your program has been integrated with anyexec into a built-in. net runtime, and named independently by your program, the client can run normally without installing mono. Now, you only need to compress the entire folder to use. As for how you release it, how to hand it over to the customer, and how to let the customer learn how to decompress and run it, it is definitely not my business!

The above are all the steps for using AnyExec. With AnyExec, it's not hard to run. net Applications on Linux!

This article permanently updates the link address:

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.