Publishing an application in Visual Studio 2010/2012

大兔子大兔子 提交于 2019-12-08 14:04:47

问题


I have a project built in Visual Studio 2010, with a copy of it built using Visual Studio 2012. Each time I click to publish the application and then email a zipped copy of the result(in either 2010 or 2012) I run into a problem where the application does not install at all with an error that the admin should be contacted or it installs and then a new copy of the same app does not(later on on the same machine). How do I fix this problem please? I have tried many of the suggested clickonce fixes on many threads already but I am wondering if there is a sure way to deal with this once and for all.


回答1:


In order to help you we'll need more details on your setup:

  1. WinForms/Web/Console/Service app
  2. Are you publishing it on local machine or remote machine?
  3. Details of error message
  4. Details of commands being run (VS -> Tools -> Options -> Projects & Solutions -> Build And Run -> MS Build Verbosity -> Diagnostic)
  5. Are you using build and deployment package or not.

Turning on msi logging helps too. http://www.advancedinstaller.com/user-guide/msiexec.html

In order to install new msi package on a remote machine you will have to uninstall the previous one first, afaik vs will not do that for you.




回答2:


I would guess that the target machine does not have the .net version installed that the application is requiring. Have you checked that the .net version against which you compile your application (probably 4.0 or 4.5) is installed on the target machine?




回答3:


This is an open bug in visual studio 2010 . Consider using the following plugin

http://visualstudiogallery.msdn.microsoft.com/22c5f085-d1be-44a3-b5a4-4710a467b972

The issue in Microsoft connect issue tracking system

https://connect.microsoft.com/VisualStudio/feedback/details/588047

Has been corrected for VS2012




回答4:


I may have run into something similar once before... Have You tried including all of the .dll files associated with your project in the install?

looking at this from studio 2010:

  1. In the properties page of your project navigate to the publish tab
  2. under "install mode and settings" click on the application files button
  3. in the application files dialog under the publish status column, make sure all of the files listed are set to either Prerequisite(Auto), Include, or Include(Auto)

Once you have included all the files republish and try again. Hope this helps.



来源:https://stackoverflow.com/questions/13080037/publishing-an-application-in-visual-studio-2010-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!