C# Portable Exe File
来源:互联网 发布:网络在线电话免费版 编辑:程序博客网 时间:2024/06/05 08:12
转自:http://www.codeproject.com/Tips/392308/Csharp-Portable-Exe-File
Introduction
One of the disadvantages of C# is that when you want to run it, the computer must have .NET Framework installed on it. After this article, you will be able to make it runnable from any Windows without the must of .NET.
How to do it?
- Make a C# project.
- In Solution Explorer, inside your project, there is a line "Reference". Click the plus near it. Now you can see all the dependencies of your project. Delete all references that aren't used (delete, and try to run/build. If it is possible to do it, that it is unused. If there is an error, return it by adding it (right mouse click, "Add Reference")).
- For each reference, go to Properties, and in the property "Copy Local" choose "True". For each Image, Icon... make like to the referenced.
- Rebuild you project. Now in your Build/Release folder (inside bin) you will see many dll files. Those files have the information of every resource.
- Copy all the files in the folder (from step number 4) into a new folder.
- Go to the folder: "<windows folder>\Microsoft.Net\Framework\<latest version>" and copy the file "mscorlib.dll" to the new folder from step 5. If you don't find this file, you can always make a search in the Hard Drive which contains Windows folder.
- Now your app is portable (with the whole folder content).
- All the referenced should be in the same folder as the .exe file.
- If something is missing, there may be problems with the program.
- C# Portable Exe File
- Portable Executable FILE FORMAT
- exe file
- 探密PE文件格式(Portable Executable File Format)(上)
- Inject your code to a Portable Executable file by ashkbiz
- Inject your code to a Portable Executable file
- Microsoft Portable Executable and Common Object File Format Specification
- Inject your code to a Portable Executable file
- Inject your code to a Portable Executable file
- The Portable Executable File Format from Top to Bottom
- Inject your code to a Portable Executable file
- Inject your code to a Portable Executable file
- Weekend Project: Make a Portable Encrypted File Safe
- The Portable Executable File Format from Top to Bottom
- portable Executable: Converting RVA to File Offset and Back
- The Portable Executable File Format PE文件格式英文说明文档
- The Portable Executable File Format PE文件格式中文翻译文档
- The Portable Executable File Format from Top to Bottom
- Command对象
- 嵌入式DVR单芯片解决方案
- 单芯片MPEG4视频编码解码芯片(SOC/ASIC)-FIC8120/GM8126
- keep buffer cache
- Dedecms基本目录结构
- C# Portable Exe File
- POJ 3259 SPFA判断负权回路
- 解决hadoop-eclipse插件无法连接以及出现异常
- Abator代码生成工具 - -Eclipse下Ibatis|Mybatis代码生成工具 利器
- IOS 应用运动事件分析
- GPS缺陷可让黑客跟踪智能手机用户,甚至完全接管移动设备
- 在线查看word文档
- 一步步写驱动--module_init/module_exit
- IOS 应用程序的程序包分析