程序建立在Win7上不会运行在WinXP上 [英] Program Built on Win7 won't run on WinXP

查看:138
本文介绍了程序建立在Win7上不会运行在WinXP上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我建立在Windows 7(32位)使用Visual Studio 2005.该程序构建正常,我可以移动到另一个Windows 7机器,并运行它很好。问题出现时,我试图将其移动到Windows XP Pro机器。当我尝试运行该文件,我得到以下错误:



此应用程序无法启动,因为应用程序配置不正确。重新安装应用程序可能会解决此问题。



当我打开事件查看器时,与此问题相关的系统错误有三种:




  • 无法找到依赖的程序集Microsoft.VC80.CRT,最后一个错误是您的系统上未安装所引用的程序集。

  • 解决部分程序集Microsoft.VC80失败.CRT。参考错误消息:您的系统上未安装引用的程序集。

  • 生成激活上下文失败[路径到我的exe]。参考错误消息:操作已成功完成。



我试过安装Visual C ++ 2005 SP1 Redistributable Package, 。



如果我在XP计算机上构建项目,我可以在另一台XP计算机上运行它(没有C ++可重新分发) 7计算机。



始终在XP上构建不是一个可行的选择,因为我不是唯一的人谁会建设这个,其他人都将使用Win7。

解决方案

这是最终解决问题的方法:



以下文件夹:C:\Program Files \ Microsoft Visual Studio 8 \VC\redist\x86\Microsoft.VC80.CRT是在事件查看器中提到的文件)进入与我在执行时遇到的.exe相同的目录。这让程序使用它构建的依赖关系。


I have a project that I'm building on Windows 7 (32-bit) using Visual Studio 2005. The program builds fine, and I can move it to another Windows 7 machine and run it just fine. The problem comes when I try to move it to a Windows XP Pro machine. When I try to run the file, I get the following error:

"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

When I open the event viewer, there are three system errors related to this issue:

  • Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.
  • Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.
  • Generate Activation Context failed for [path to my exe]. Reference error message: The operation completed successfully.

I've tried installing the Visual C++ 2005 SP1 Redistributable Package, which doesn't help.

If I build the project on an XP computer, I'm able to run it on another XP computer (that doesn't have the C++ redistributable) and a Windows 7 computer.

Always building on the XP isn't a viable option since I'm not the only person who will be building this and everyone else will be using Win7.

解决方案

This is what ended up fixing the problem:

Copy the following folder: "C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT" (since this is the file mentioned in the event viewer) into the same directory as the .exe I was having trouble executing. This lets the program use the dependency it was built against.

这篇关于程序建立在Win7上不会运行在WinXP上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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