发布后运行exe时出错

发布后运行exe时出错

本文介绍了发布后运行exe时出错:“此程序可能未正确安装"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在发布项目后,我不能直接运行我的exe(在"Debug"文件夹中找到的exe),而在关闭项目后却没有收到此错误消息? -因此不使用我已发布的项目,而仍然仅使用exe

Why after I've published my Project, I cant just run my exe (the one you find in your "Debug" folder) without getting this error message after you close your project? - Thus not using my published project, and still just using the exe

我已经创建了一个测试项目,只是为了测试这种情况,而且每次都会发生.

I've created a test project just to test if this is the case, and this happens every time.

  • 创建一个新的Windows项目.
  • 构建它.
  • 转到调试文件夹.
  • 将exe复制到您的桌面
  • 运行程序

  • Create a new windows project.
  • Build it.
  • Go to the debug folder.
  • Copy the exe to your desktop
  • Run the program

因此将打开一个空白表格.

So a blank form opens up.

您如何摆脱这种情况?我读过您应该在清单中添加内容,但是肯定有一种更简单的方法吗?我在Windows 7 64位计算机上使用Visual Studio 2008.

How do you get rid of this? I've read you should add stuff to your manifest etc, but surely there must be an easier way? I'm using Visual Studio 2008 on a windows 7 64-bit machine.

我找到了解决问题的办法.发生这种情况的原因是因为我在项目名称中使用了安装程序"或安装程序"一词,您相信吗……类似的东西可能会影响这样的项目.

I found the solution to the problem. The reason this happened is because I had the word "installer" or "Setup" in my project name, can you believe it... that something like that could influence the project like this.

我发现此问题已在此处得到解答如何预防在Vista上显示此程序可能未正确安装"的消息这确实是程序执行此操作的原因.

i found that this question is answered here How to prevent "This program might not have installed correctly" messages on VistaThis was indeed the reason the program did this.

推荐答案

之所以发生这种情况,是因为该项目的名称中带有"Installer"或"Setup"字样.创建一个名称中没有这些单词的项目可以解决该问题.(确实是一个非常奇怪的问题)

This happened because the project had the words "Installer" or "Setup" in the project's name.Creating a project with a name without these words in solved the problem.(A very strange problem indeed)

指向类似问题和答案的链接此处

A link to a similar question and answer here

这篇关于发布后运行exe时出错:“此程序可能未正确安装"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 09:06