创建项目的exe后 [英] After creating exe of project

查看:88
本文介绍了创建项目的exe后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建项目的exe后,软件在我的电脑上运行,但不在另一台电脑上运行。我可以在每台电脑上安装visual studio 2010吗?或另一个。请指导

After creating exe of project, software runs on my pc but not on another pc. Can I install visual studio 2010 on each and every pc? Or another else. Please guide

推荐答案

您好,



您不需要Visual Studio来运行您的应用程序。如果您的应用程序无法在另一台计算机上运行,​​则可能未安装.NET Framework。

因此,您应该在另一台计算机上安装.NET Framework(它是免费的):

下载Microsoft .NET Framework 4.5 [ ^ ]


这是因为您的.exe文件不包含计算机可以理解的本地机器代码,而是包含中间语言代码(IL),这就是为什么您的代码不能直接在移植的机器上运行以便运行的原因这个.exe文件需要将.exe文件中包含的包含IL代码转换为本机机器代码,因此您需要一个可以为您完成此任务的编译器。 .Net框架提供了CLR(公共语言运行库),其中包含另一个称为JIT编译器的重要组件,它将IL代码转换为本机机器代码,然后可以最终执行。因此解决方案是你需要.NET框架安装在每个要移植.exe文件的机器上以便执行。
it's because your .exe file does not contain the native machine code which computers can understand instead it contains intermediate language code(IL) and that's the reason why your code won't run directly on the ported machine in order to run this .exe file you need to convert the containing IL code contained in the .exe file into native machine code for this your need a compiler that can do this job for you. .Net framework provides CLR(common language runtime) which contains another important component called the JIT compiler which does this conversion of IL code into native machine code which can then be finally executed.so the solution to this is you neeed to have .NET framework installed on every machine where you are porting your .exe file in order to execute.


这是因为.NET Framework没有安装在其他PC上

i更喜欢你设计一个Setup.exe,然后将.NET Framework放在其上以便自动安装,或者当您想在VS中创建一个新的解决方案时,可以选择较低的.NET框架。

.NET Framework下载链接:< a href =http://msdn.microsoft.com/en-us/vstudio/aa496123.aspx> http://msdn.microsoft.com/en-us/vstudio/aa496123.aspx [< a href =http://msdn.microsoft.com/en-us/vstudio/aa496123.aspxtarget =_ blanktitle =New Window> ^ ]



祝你好运!
It happens because .NET Framework is not installed on other PCs
i prefer you Designing a Setup.exe and then put .NET Framework on it for installing automatically or you can choose lower .NET Frameworks when you want to create a new solution in VS.
.NET Framework Download Links: http://msdn.microsoft.com/en-us/vstudio/aa496123.aspx[^]

Good luck!


这篇关于创建项目的exe后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆