【发布时间】:2011-12-16 12:34:36
【问题描述】:
可能重复:
How to programatically build and compile another c# project from the current project
假设我们有一个名为 Program1.exe 的应用程序,所以当我单击该 exe 时,该程序必须创建另一个 exe,让我们说 Program2.exe 在屏幕上写“hello world”。所以我认为它可以在代码中使用 csc 命令使用 Visual Studio 的命令行工具,无论如何,如果它可能 Program2.exe 可以替换 Program1.exe?我的意思是Program1.exe可以在运行时重新编译?
【问题讨论】:
-
你可以使用命令行来编译你的程序
-
@GabrielGM 我已经说过“所以我认为它可以使用 Visual Studio 的命令行工具在代码中使用 csc 命令”
标签: c# .net csharpcodeprovider