在Visual Studio中运行作为资源添加的exe文件

简单地说,我已经在视觉工作室项目中添加了一个exe文件作为资源。 我该如何运行这个文件? 我在c#中编码。

您可以将Resource作为byte []

byte[] myResBytes = ...; Assembly asm = Assembly.Load(myResBytes); // search for the Entry Point MethodInfo method = asm.EntryPoint; if(method == null) throw new NotSupportedException(); // create an instance of the Startup form Main method object o = asm.CreateInstance(method.Name); // invoke the application starting point method.Invoke(o, null); 

另请参阅此处了解更多详情

希望这可以帮助

您必须使用Process.Start方法。 在msdn中查看