是什么导致部署对于某些用户成功而对于其他用户失败?
我正在尝试使用安装和部署项目来部署 Visual C++ 应用程序(使用 Microsoft Visual Studio 2008 开发)。安装后,某些目标计算机上的用户在启动应用程序可执行文件后会收到以下错误消息:“此应用程序无法启动,因为应用程序配置不正确。重新安装应用程序可能会解决问题。”安装后其他用户可以正常运行该应用程序。尽管我在 Visual Studio 帮助文件和在线论坛上花费了几个小时(大多数帖子可以追溯到 2006 年),但我无法找到此问题的根本原因。 Stack Overflow 上有人有建议吗?提前致谢。其他详细信息如下所示。
该应用程序使用 FLTK 1.1.9 作为 GUI 库,以及一些 Boost 1.39 库(regex、lexical_cast、date_time、math)。
我确保我正在尝试部署应用程序的发布版本(而不是调试版本)。代码生成设置中的运行时库是多线程DLL (/MD)。
myapp.exe 的依赖项遍历器列出了以下 DLL:wsock32.dll、comctl32.dll、kernel32.dll、user32.dll、gdi32.dll、shell32.dll、ole32.dll、mvcp90.dll、msvcr90.dll。
在安装和部署项目中,我将以下 DLL 添加到目标计算机上的文件系统:fltkdlld.dll 以及名为 Microsoft.VC90.CRT 的文件夹,其中包含 msvcm90.dll、msvcp90.dll、mcvcr90.dll 和 Microsoft.VC90。 CRT.清单。
收到错误消息的目标计算机上的安装过程需要首先安装 .Net Framework 3.5。
有什么建议吗?提前致谢!
I am trying to deploy a Visual C++ application (developed with Microsoft Visual Studio 2008) using a Setup and Deployment Project. After installation, users on some target computers get the following error message after launching the application executable: “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.” Another user after installation could run the application properly. I cannot find the root cause of this problem, despite spending several hours on the Visual Studio help files and online forums (most postings date back to 2006). Does anyone at Stack Overflow have a suggestion? Thanks in advance. Additional details appear below.
The application uses FLTK 1.1.9 for a GUI library, as well as some Boost 1.39 libraries (regex, lexical_cast, date_time, math).
I made sure I am trying to deploy the release version (not the debug version) of the application. The Runtime library in the Code Generation settings is Multi-threaded DLL (/MD).
The dependency walker of myapp.exe lists the following DLLs: wsock32.dll, comctl32.dll, kernel32.dll, user32.dll, gdi32.dll, shell32.dll, ole32.dll, mvcp90.dll, msvcr90.dll.
In the Setup and Deployment Project, I add the following DLLs to the File System on Target Machine: fltkdlld.dll, and a folder named Microsoft.VC90.CRT with msvcm90.dll, msvcp90.dll, mcvcr90.dll and Microsoft.VC90.CRT.manifest.
The installation process on the target computers getting the error message requires having the .Net Framework 3.5 installed first.
Any suggestion? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 Visual C++ Redistributable 添加到您的部署项目,并确保在安装时运行 Setup.exe 而不是 MSI。这将调用 VCRedist 引导程序,以确保您的 PC 在安装应用程序之前拥有这些部分。
Dependency Walker 仅显示静态(链接时)依赖关系 - 它不可能了解动态依赖关系,例如 COM 对象。
Add the Visual C++ Redistributable to your Deployment project and be sure to run Setup.exe instead of the MSI when installing. This will invoke the VCRedist bootstrapper to ensure your PC has those pieces before installing your app.
Dependency Walker only shows static (link time) dependencies - it cannot possibly know about dynamic dependencies such as COM objects.
去年 ATL 安全更新后我也遇到了类似的问题。我的应用程序需要比部署项目包含的更高版本的 C++ 运行时库。
安装后尝试在目标计算机上运行 Windows Update,或直接下载并安装最新的(2009 年 7 月 28 日)C++ 可再发行组件包。
http://support.microsoft.com/?kbid=973551
这解决了问题我。不过我还没有修复部署项目。
I had a similar problem after the ATL security updates last year. My app needed a later version of the C++ runtime libraries than the deployment project included.
Try running Windows Update on the target machines after installation, or download and install the latest (28 July 2009) C++ redistributable package directly.
http://support.microsoft.com/?kbid=973551
That solved the problem for me. I haven't fixed the deployment project yet though.