简体   繁体   English

如何从Visual Studio 2012导出C#应用程序以在其他计算机上运行?

[英]how can I export a C# application from Visual Studio 2012 to run in other computers?

I just made my first C# application in Visual Studio 2012 and I want to export it in some way so other people could use it in they computers (including computers without Visual Studio 2012). 我刚刚在Visual Studio 2012中创建了我的第一个C#应用程序,我想以某种方式导出它,以便其他人可以在他们的计算机中使用它(包括没有Visual Studio 2012的计算机)。 How can I do it? 我该怎么做? I'm new at C# and I couldn't find anything that I could understand. 我是C#的新手,我找不到任何我能理解的东西。 Can someone explain or indicate some site with a good (and maybe didactic) explanation on how it works? 有人可以解释或指出某个网站有一个很好的(也许是教学的)解释它是如何工作的? I have only made C/C++ programs by now, and they I just needed the .exe file, but, based on what I could find, I need something else to send a C# program to others to use. 我现在只制作了C / C ++程序,他们只需要.exe文件,但根据我能找到的内容,我还需要其他东西将C#程序发送给其他人使用。 Sory for the bad English and thanks for those who help. Sory的英语不好,感谢那些帮助的人。

Right-click the project in VS 2012, and choose Publish... from the context menu. 在VS 2012中右键单击该项目,然后从上下文菜单中选择“ Publish... ”。 Publishing to a file lets you create an installer: 发布到文件可以创建安装程序:

  • Choose a location in the file system to which you would like to save the installer 在文件系统中选择要保存安装程序的位置
  • Click [Finish] 单击[Finish]
  • Wait for the publishing operation to complete 等待发布操作完成

A Setup.exe installer file will be created at the location that you have selected in the first step of the publish wizard. 将在发布向导的第一步中选择的位置创建Setup.exe安装程序文件。 Share the installer with the people to whom you would like to give your application. 与您要向其提供申请的人员共享安装程序。

构建项目后,您将在bin\\(Debug or Release)找到一个EXE文件

You need any computer that wants to run it to be windows, and running the correct version of the .net framework. 您需要任何想要将其运行的计算机作为Windows,并运行正确版本的.net框架。 If it's a program that's created with VS2012, that'll be .net 2.0 to 4.5.2. 如果它是用VS2012创建的程序,那将是.net 2.0到4.5.2。 After that, you need to find the location of your program, and you can just copy the debug folder that you are currently running from, and your program will work. 之后,您需要找到程序的位置,并且只需复制当前运行的调试文件夹,程序就可以运行。

Check also the .net framework that it is required in order for c# apps to run. 还要检查.net框架,以便运行c#apps。 You can find what framework your app is build in projext properties. 您可以在项目属性中找到您的应用程序构建的框架。 If the target computer has an old os (XP) maybe the .net framework needs also to be installed 如果目标计算机具有旧的操作系统(XP),则还可能需要安装.net框架

Please check this link, This link describes how to deploy vs 2010 application 请查看此链接,此链接介绍如何部署vs 2010应用程序

http://www.dreamincode.net/forums/topic/231074-setup-and-deployment-in-visual-studio-2010/ http://www.dreamincode.net/forums/topic/231074-setup-and-deployment-in-visual-studio-2010/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以将在Visual Studio 2012中开发的C#Windows应用程序作为便携式应用程序制作吗? - Can I make an application made as a C# Windows Application developed in Visual Studio 2012 as a portable application? 如何从Visual Studio 2012中编写的C#代码生成Visio 2010中的UML图? - How can I generate UML diagrams from C# code written in Visual Studio 2012 into Visio 2010? 在c#下使用Visual Studio 2012创建.sql脚本,以及如何运行它? - create .sql script with Visual Studio 2012 at c# and how run it? visual studio 2012 C#:应用程序文件夹 - visual studio 2012 C#: application folders 如何从Visual Studio 2012调试引用的dll - How can I debug a referenced dll from Visual Studio 2012 部署Visual Studio 2012 C#Windows应用程序 - Deploying visual studio 2012 c# windows application 在Visual Studio 2012中发布C#winform应用程序 - publishing a C# winform application in Visual Studio 2012 我可以在 Visual Studio/Code 中测试/运行 Unity C# 吗? - Can I test/run Unity C# in Visual Studio/Code? 如何在Visual Studio 2010中使用SQL Server 2012数据库打包和部署C#桌面应用程序? - How to package and deploy a C# desktop application with a SQL Server 2012 database in Visual Studio 2010? 如何将控制台应用程序中的变量值传递给 C# 中的 windows 表单应用程序(Visual Studio) - How do i pass a variable value from Console application to windows form application in C# (visual studio)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM