从 VB.Net 脚本创建 EXE 文件

Create EXE Files From VB.Net Script

有没有办法使用 VB.Net 从脚本创建 .exe 文件?我想为多个 .exe 文件创建一个安装程序,并且我已经尝试过 IExpress,但是它不能完全正常工作,然后我无法添加用于选择目标文件路径的表单,所以我想在 VB.NET.

system.codedom.compiler 命名空间具有编译 .net 代码和编写 .exe 和 .dll 文件所需的所有 类。

我在这里得到答案:将文件添加到My.Resources并用System.IO.File.Copy(My.Resources.file_to_install.exe, "the/specified/file/location.exe")复制到指定位置。