C # The program is installed through.. net installation package can run, so sometimes it is inconvenient, you must install a. net installation package. net installation package, although the system will carry this, but there are still a considerable number of computers do not install this. In this way, how can we avoid this problem. I checked a lot of information and comments from our online colleagues. In general, there are only two ways: borrow other tools and reduce. net dll. The former is to achieve the seemingly cross-platform, and the latter is to reduce the size of the. net environment to avoid inconvenience. The following uses the. net framework 2.0 environment as an example.
1. Borrow a tool and do not install. net framework 2.0
There are two common methods to use this method: Use the virtual. net environment of Apsara and use MONO to start the program.
1. Use the Apsara virtual machine. Download Feixin Installation File http://www.skycn.com/down.php? Uri = http://skycn.gjwww.com: 82/down/Fetion2008_skycn.zip, after successful installation, in the installation directory: China Mobile \ Fetion \ VMDotNet \ Uninstall start your exe, for example, you can write batch processing: execute. bat
FetionVM.exe your .exe
FetionVM.exe your .exe
This file and your program are all stored in the fetionvm.exe file in a directory.
2. Use MONO. The process is the same as using Apsara.
Bin \ mono.exe your .exe
Bin \ mono.exe your .exe
Batch files and programs are placed in the same directory.
I have tested these two methods. Some simple WinForm programs can run without installation.. net environment, but large software cannot run when it comes to databases. It may be because it does not support databases.
Ii. Reduce the. net installation package
This method is installed.. net environment, delete unnecessary. net dll, this operation is a little troublesome, You need to constantly delete the dll and then run the program test, and the deleted. the. net environment only applies to your program and is not universal, but it can be reduced. to reduce the size of the program installation package.
Of course, there should be more ways to solve the. net problem. There will be new results later, and we will share them with you.
From Poplar