我试图使用bat文件和C#编译IL代码。这是一个C#代码
ProcessStartInfo processStartInfo = new ProcessStartInfo(ILCompiler, @"c:\Windows\Microsoft.NET\Framework\v4.0.30319\" + ILCompiler +
" "+OutILFile+" /exe /output:" + OutExeFile + " /debug=IMPL");
processStartInfo.UseShellExecute = false;
processStartInfo.CreateNoWindow = false;
using (Process.Start(processStartInfo)) ;这是一个bat文件
c:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe Source.il /exe /output:my-assebmly.exe /debug=IMPL
pause运行ILAsm的字符串是完全相同的(即processStartInfo.Arguments = Arguments = "c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\ilasm.exe Source.il /exe /output:my-assebmly.exe /debug=IMPL") )。
尽管如此,我在使用C#运行时还是会出现一个错误
程序无法启动,因为您的计算机中缺少fusion.dll。尝试重新安装程序以解决此问题。
我该怎么解决呢?我需要使用ILAsm运行C#。
发布于 2012-10-13 08:53:10
试试这个:
processStartInfo.WorkingDirectory = @"c:\Windows\Microsoft.NET\Framework\v4.0.30319\"https://stackoverflow.com/questions/12871445
复制相似问题