简体   繁体   English

部署C#Winform应用程序

[英]Deploying C# winform application

I have developed a C# winform app in VS 2012, but when I deploy it to another machine, it's exe file does not launch until and unless the machine has VS 2012 installed in it. 我在VS 2012中开发了一个C#winform应用程序,但是当我将其部署到另一台计算机上时,直到并且除非计算机中安装了VS 2012,它的exe文件才会启动。 Initially I thought there was a problem with deployment, but I have tried all methods, by simply transferring the bin folder to creating a setup project using installShield, I tried deploying a simple app which was successful without having to install VS 2012. Could someone please give me the reason behind this dependency of my app with VS 2012, and how to get rid of it? 最初,我认为部署存在问题,但是我尝试了所有方法,只需将bin文件夹转移到使用installShield创建安装项目中,我便尝试部署了一个简单的应用程序,而无需安装VS 2012就可以成功。请告诉我VS 2012依赖于我的应用程序的原因,以及如何摆脱它? I cannot afford to install a VS 2012 on every machine that the software needs to deployed to. 我无法在需要将软件部署到的每台计算机上安装VS 2012。 Thank you so much. 非常感谢。

This is all about which .Net Framework is installed on the machine. 这就是在计算机上安装哪个.Net Framework的全部内容。

For Instance, VS2012 will run on .Net Framework 4.5, but the computer your trying to run this software on maybe running on an earlier version. 对于Instance,VS2012将在.Net Framework 4.5上运行,但是您尝试在该软件上运行该计算机的计算机可能正在较早版本上运行。

If any of the assemblies that your adding to your solution are built on a later version of the .Net framework then it will be incompatible on the users machine. 如果您要添加到解决方案中的任何程序集都基于.Net框架的更高版本构建,则它将在用户计算机上不兼容。

change Your project Debug mode to Release Mode Then Run The App then Go to >Bin > Release Folder then u can Find Exc Setup !! 将您的项目的Debug模式更改为Release Mode,然后运行App,然后转到> Bin> Release Folder,然后您可以找到Exc Setup! Have Fun with Code !! 玩得开心!

Probably your app depends on some assembly that is installed along with VS. 可能您的应用程序依赖于与VS一起安装的某些程序集。 You can use Dependency Walker to find out exactly what. 您可以使用Dependency Walker来找出确切的内容。 On second thought, since this is a .Net application your dependencies should be limited to .Net assemblies and the .Net framework - you could find out exactly what you're missing on the target machine with dotPeek . 再次考虑,由于这是一个.Net应用程序,因此您的依赖项应限于.Net程序集和.Net框架-您可以使用dotPeek确切地找到目标计算机上缺少的内容

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM