当我在一台计算机上开发 EXE 并在另一台计算机上运行它时,为什么安装 vcredist_x86.exe 无法修复 SideBySide 错误?

发布于 2024-12-27 14:07:42 字数 6031 浏览 5 评论 0 原文

问题

我在 Windows XP Professional Version 2002 Service Pack 3 上使用 Microsoft Visual Studio 2005 Verison 8.0.50727.762 (SP.050727-7600) 编写了一个名为“Foo”的 C++ 项目。我将该项目构建到 Foo 中。 EXE文件。然后,我将文件 Foo.exe 复制到 Windows Server 2003 Enterprise Edition Service Pack 2。当我尝试运行它时,它失败并出现此错误,

C:\foo.exe
The application has failed to start because the application configuration is incorrect.
Reinstalling the application may fix the problem.

在“事件查看器”中 >系统记录了三个事件。

事件ID:32;来源:SideBySide

Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was
The referenced assembly is not installed on your system.

事件 ID:59;来源:SideBySide

Resolve Partial Assembly failed for Microsoft.VC80.CRT.
Reference error message: The referenced assembly is not installed on your system.

事件 ID:59;来源:SideBySide

Generate Activation Context failed for C:\foo\Foo.exe.
Reference error message: The referenced assembly is not installed on your system.

安装 Microsoft Visual C++ 2005 Redistributable 没有修复它

  1. http://www.microsoft.com/download/en/details.aspx?id=3387
  2. 安装了它。安装程序创建了一个名为 C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd 的文件夹。

从“添加或删除程序”中找到的该软件的版本是“8.0.50727.42”。

在尝试运行 C:\foo\foo.exe 时,我遇到了与上面描述的相同的错误。

安装 Microsoft Visual C++ 2005 SP1 Redistributable 无法修复问题

  1. http://www.microsoft.com/download/en/details.aspx?id=5638
  2. 安装了它。安装程序创建了一个名为:C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 的文件夹。

从“添加或删除程序”中找到的该软件的版本是“8.0.56336”。

在尝试运行 C:\foo\foo.exe 时,我遇到了与上面描述的相同的错误。

从同一台计算机(我运行 EXE 的计算机)复制 CRT DLL 和清单并没有解决问题。

  1. 我复制了 msvcm80.dllmsvcp80.dll msvcr80.dll 来自 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acdC:\foo
  2. 接下来我复制了 C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.manifestC:\foo 并将其重命名为 Microsoft.VC80.CRT.manifest

清单文件的第四行如下所示:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.42"
                  processorArchitecture="x86"
                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

当我这次尝试运行 C:\foo\foo.exe 时,它​​不起作用。我使用 C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 中的 DLL 和相应的清单文件再次重复了此操作。这也没有帮助。我遇到了同样的错误。

在这两种情况下,我在事件查看器中都收到以下错误>系统。

事件ID:34;来源:SideBySide

Component identity found in manifest does not match the identity of the component requested

事件 ID:58;来源:SideBySide

Syntax error in manifest or policy file "C:\foo\Microsoft.VC80.CRT.MANIFEST" on line 4.

事件 ID:59;来源:SideBySide

Generate Activation Context failed for C:\foo\Foo.exe. Reference error message: The manifest file contains one or more syntax errors.

从 Windows XP 计算机(我在其中构建了 EXE)复制 CRT DLL 和清单并没有解决问题。

  1. 我复制了 msvcm80.dllmsvcp80 .dllmsvcr80.dll 来自 Windows XP 计算机的 C:\winnt\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700(我在其中开发和构建 foo.exe) 到 Windows Server 2003 的 C:\foo (我尝试在其中运行 foo.exe)。
  2. 接下来我复制了 C:\winnt\winsxs\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700.manifestC:\foo 并将其重命名为 Microsoft.VC80.CRT.manifest

清单文件的第四行如下所示:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762"
                  processorArchitecture="x86"
                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

在尝试运行 C:\foo\foo.exe 现在,我遇到了上一节中提到的相同错误。

从 Visual Studio 文件夹复制 CRT DLL 和清单修复了该问题。

  1. 复制 msvcm80.dllmsvcp80.dllmsvcr80.dllMicrosoft.VC80.CRT.manifest 来自 C:\Program Files\Microsoft Visual Studio Windows XP 计算机(我在其中开发和构建 foo.exe)的 8\VC\redist\x86\Microsoft.VC80.CRT 到 Windows Server 2003 计算机(其中我正在尝试运行它)。

清单文件的第四行如下所示:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195"
                  processorArchitecture="x86"
                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

这次我可以毫无问题地运行 C:\foo\foo.exe。

问题

我期望按照第二种方法中所述安装“Microsoft Visual C++ 2005 SP1 Redistributable”(vcredist_x86.exe) 可以修复该问题。但事实并非如此。从开发计算机的 C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT 文件夹复制 DLL 和清单文件修复了该问题。为什么会这样呢?

构建选项

以防万一,它可以帮助您回答我的问题。以下是我从 Visual Studio 项目属性中选取的编译器和链接器选项:

配置属性 > C/C++>命令行:

<代码>/O2 /GL /D "_MBCS" /FD /EHsc /MD /Fo"Release\\" /Fd"Release\vc80.pdb" /W3 /nologo /c /Wp64 /Zi /TP / errorReport:prompt

配置属性>链接器>命令行:

/OUT:"C:\MixedBag\Release\Foo.exe" /NOLOGO /MANIFEST /MANIFESTFILE:"Release\Foo.exe.intermediate.manifest" /DEBUG /PDB:"c:\MixedBag\发布 \Foo.pdb" /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

Issue

I wrote a C++ project called 'Foo' using Microsoft Visual Studio 2005 Verison 8.0.50727.762 (SP.050727-7600) on Windows XP Professional Version 2002 Service Pack 3. I built the project into Foo.exe. Then, I copied the file Foo.exe to a Windows Server 2003 Enterprise Edition Service Pack 2. When I tried to run it, it failed with this error,

C:\foo.exe
The application has failed to start because the application configuration is incorrect.
Reinstalling the application may fix the problem.

In Event Viewer > System, three events were logged.

Event ID: 32; Source: SideBySide

Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was
The referenced assembly is not installed on your system.

Event ID: 59; Source: SideBySide

Resolve Partial Assembly failed for Microsoft.VC80.CRT.
Reference error message: The referenced assembly is not installed on your system.

Event ID: 59; Source: SideBySide

Generate Activation Context failed for C:\foo\Foo.exe.
Reference error message: The referenced assembly is not installed on your system.

Installing Microsoft Visual C++ 2005 Redistributable didn't fix it

  1. Downloaded vcredist_x86.exe from http://www.microsoft.com/download/en/details.aspx?id=3387
  2. Installed it. The installer created a folder called C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.

The version of this software as found from 'Add or Remove Programs' was '8.0.50727.42'.

On trying to run C:\foo\foo.exe, I got the same errors I described above.

Installing Microsoft Visual C++ 2005 SP1 Redistributable didn't fix it

  1. Downloaded vcredist_x86.exe from http://www.microsoft.com/download/en/details.aspx?id=5638
  2. Installed it. The installer created a folder called: C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700.

The version of this software as found from 'Add or Remove Programs' was '8.0.56336'.

On trying to run C:\foo\foo.exe, I got the same errors I described above.

Copying CRT DLLs and manifest from the same machine (where I'm running the EXE) didn't fix it.

  1. I copied msvcm80.dll, msvcp80.dll and msvcr80.dll from
    C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
    to C:\foo.
  2. Next, I copied
    C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd.manifest
    to C:\foo and renamed it to Microsoft.VC80.CRT.manifest.

The fourth line of the manifest file looked like this:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.42"
                  processorArchitecture="x86"
                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

When I tried running C:\foo\foo.exe this time, it didn't work. I repeated this thing again with the DLLs in C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 and the corresponding manifest file. It didn't help as well. I got the same error.

In both cases, I got the following errors in Event Viewer > System.

Event ID: 34; Source: SideBySide

Component identity found in manifest does not match the identity of the component requested

Event ID: 58; Source: SideBySide

Syntax error in manifest or policy file "C:\foo\Microsoft.VC80.CRT.MANIFEST" on line 4.

Event ID: 59; Source: SideBySide

Generate Activation Context failed for C:\foo\Foo.exe. Reference error message: The manifest file contains one or more syntax errors.

Copying CRT DLLs and manifest from the Windows XP machine (where I built the EXE) didn't fix it.

  1. I copied msvcm80.dll, msvcp80.dll and msvcr80.dll from
    C:\winnt\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700 of Windows XP machine (where I developed and built foo.exe)
    to C:\foo of Windows Server 2003 (where I am trying to run foo.exe).
  2. Next, I copied
    C:\winnt\winsxs\Manifests\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700.manifest
    to C:\foo and renamed it to Microsoft.VC80.CRT.manifest.

The fourth line of the manifest file looked like this:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762"
                  processorArchitecture="x86"
                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

On trying to run C:\foo\foo.exe now I got the same errors mentioned in the previous section.

Copying CRT DLLs and manifest from Visual Studio folder fixed it.

  1. Copied msvcm80.dll, msvcp80.dll, msvcr80.dll and Microsoft.VC80.CRT.manifest from C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT of Windows XP machine (where I developed and built foo.exe) to C:\foo of Windows Server 2003 machine (where I am trying to run it).

The fourth line of the manifest file looked like this:

<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195"
                  processorArchitecture="x86"
                  publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>

This time I could run C:\foo\foo.exe without any issues.

Question

I was expecting that installing 'Microsoft Visual C++ 2005 SP1 Redistributable' (vcredist_x86.exe) as described in the second approach would fix it. But it didn't. Copying the DLLs and manifest files from the C:\Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT folder of the development machine fixed it. Why was it so?

Build options

In case, it helps you to answer my question. Here is the compiler and linker options I picked up from Visual Studio project properties:

Configuration properties > C/C++ > Command Line:

/O2 /GL /D "_MBCS" /FD /EHsc /MD /Fo"Release\\" /Fd"Release\vc80.pdb" /W3 /nologo /c /Wp64 /Zi /TP /errorReport:prompt

Configuration properties > Linker > Command Line:

/OUT:"C:\MixedBag\Release\Foo.exe" /NOLOGO /MANIFEST /MANIFESTFILE:"Release\Foo.exe.intermediate.manifest" /DEBUG /PDB:"c:\MixedBag\release\Foo.pdb" /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

飘落散花 2025-01-03 14:07:42

我会回答我自己的问题。汉斯·帕桑特和卢克对这个问题的评论很有帮助。

我下载了 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security更新并将其安装在我尝试运行C:\foo\foo.exe的系统上。此后 EXE 运行良好。

安装程序将 CRT DLL 放置在 C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86 中。所以,是的,8.0.50727.6195 就是我正在寻找的 CRT DLL 的版本,正如 Hans Passant 所说的那样。

确定此版本的最简单方法是在开发系统上构建我的项目时查看 Visual Studio 生成的清单文件。我的位于C:\Foo\Release\Foo.exe.intermediate.manifest。它有一个这样的标签:

<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195'
                  processorArchitecture='x86'
                  publicKeyToken='1fc8b3b9a1e18e3b' />

所以,这是我需要 8.0.50727.6195 版本的 DLL 的线索。剩下的就是搜索正确的 vcredist_x86.exe,它恰好位于我在第二段中提到的 URL 中。该 URL 中的页面包含指向 KB2538242 的链接,其中显示了 DLL 的版本号由安装程序安装。

注意:正如 Elie 在对此问题的不同答案中提到的,由于这是一个 32 位应用程序,因此有必要在应运行此应用程序的系统上安装 vcredist_x86.exe(不是 vcredist_x64.exe),无论该系统是 32 位 Windows 系统还是64位Windows系统。 .manifest 文件再次在 processorArchitecture 属性中提供了此线索。

I'll answer my own question. Comments to the question by Hans Passant and Luke helped.

I downloaded Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update and installed it on the system where I was trying to run C:\foo\foo.exe. The EXE ran fine after this.

The installer placed the CRT DLLs in C:\windows\winsxs\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86. So, yes, 8.0.50727.6195 was the version of the CRT DLLs I was looking for as Hans Passant rightly said.

The easiest way to figure this version was by looking at the manifest file generated by Visual Studio while building my project on the development system. Mine was located at C:\Foo\Release\Foo.exe.intermediate.manifest. It had a tag like this:

<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195'
                  processorArchitecture='x86'
                  publicKeyToken='1fc8b3b9a1e18e3b' />

So, this is a clue that I needed 8.0.50727.6195 version of the DLLs. The rest was a matter of searching for the right vcredist_x86.exe which happened to be in the URL I have mentioned in the second paragraph. The page in that URL contains a link to KB2538242 which shows the version numbers of the DLLs that would be installed by the installer.

Note: As Elie has mentioned in a different answer to this question, since this is a 32-bit application, it is necessary to install vcredist_x86.exe (not vcredist_x64.exe) on the system where this application is supposed to be run irrespective of whether that system is a 32-bit Windows system or a 64-bit Windows system. Once again, the .manifest file provides this clue in the processorArchitecture attribute.

洒一地阳光 2025-01-03 14:07:42

您必须安装“Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update”,位于:http://www.microsoft.com/en-us/download/details.aspx?id=26347

You have to install "Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update" which is here: http://www.microsoft.com/en-us/download/details.aspx?id=26347

誰認得朕 2025-01-03 14:07:42

以下是解决此问题的方法:

如果所使用的应用程序是 32 位,并且您尝试在安装了 VC_REDISTx64 的 64 位操作系统上运行它,您仍然会出现并行错误。

简单的解决方案,您还必须在 64 位操作系统上加载 VC_REDISTx86

Here is how you fix this issue:

You WILL STILL Get the sidebyside errors If the application being used is 32 bit and you try running it on a 64 bit OS which has the VC_REDISTx64 installed.

Simple solution, you MUST ALSO LOAD THE VC_REDISTx86 on the 64 bit os

纸短情长 2025-01-03 14:07:42

我有一个有点相关的问题。两台安装了VS2005的XP开发机器,分别称为A和B。我在A上开发、构建和运行。然后我将整个项目复制到B。在那里构建。尝试运行并收到 SusamPal 提到的相同错误消息。我意识到在 B 的 WinSxS 上有 x86_Microsoft.VC80.CRT_xxx 清单(和文件夹),但没有相应的 x86_Microsoft.VC80.DebugCRT_xxx 清单(为什么?!)。我尝试了 SusamPal 描述的几种舞蹈和咒语,但没有成功。我通过将 A 的 WinSxS 中的相应文件夹复制到 B 以及 WinSxs\Manifests 中的相应清单解决了该问题。

I had a somewhat related problem. Two development XP machines with VS2005 installed, call them A and B. I developed, built and ran on A. Then I copied the whole project to B. Built there. Tried to run and got the same error messages mentioned by SusamPal. I realized that on B's WinSxS there were the x86_Microsoft.VC80.CRT_xxx manifests (and folders) but not the corresponding x86_Microsoft.VC80.DebugCRT_xxx ones (and why?!). I tried several of the dances and incantations described by SusamPal to no avail. I solved the problem by copying the appropriate folders from the WinSxS of A to B AND the appropriate manifests from the WinSxs\Manifests.

在梵高的星空下 2025-01-03 14:07:42

尽管我的应用程序是

在 Win 2k8 R2 x64 上使用 vs2008 开发的(其中在 C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ 中有 msvcm90.dll、msvcp90.dll 和 msvcr90.dll) redist\amd64\Microsoft.VC90.CRT)

并在 win 2k3 SP2 x64 上运行

但是需要msvcm80.dll、msvcp80.dll 和msvcr80.dll。

安装后 Microsoft Visual C++ 2005 SP1 Redistributable Package (x86),应用程序可以正确安装并运行。

Although my application was

developed on Win 2k8 R2 x64 with vs2008 (which has msvcm90.dll, msvcp90.dll and msvcr90.dll in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\amd64\Microsoft.VC90.CRT)

and ran on win 2k3 SP2 x64,

but the msvcm80.dll, msvcp80.dll and msvcr80.dll are needed.

After install Microsoft Visual C++ 2005 SP1 Redistributable Package (x86), the application can be installed and ran rightly.

智商已欠费 2025-01-03 14:07:42

对我来说,并行错误只是通过在设置 c/c++ ->CodeGeneration->RuntimeLibrary 下进行修改,使其成为多线程调试的 MTD

For me the side by side error went just by chabging the under the setting c/c++ ->CodeGeneration->RuntimeLibrary ,make it MTD that is multi-Thread Debug

生活了然无味 2025-01-03 14:07:42

我们这里确实存在以下问题:应用程序可执行文件使用清单机制引用 dll。在过去,应用程序作者只是将所需的 dll 复制到系统目录中。不幸的是,这导致了所谓的“dll 地狱”问题,当用不兼容的新版本覆盖旧版本的 dll 时,可能会导致应用程序停止工作。 MS 随后提出了版本控制的想法(winsxs)。

不幸的是,这是一个相当复杂的机制,尝试手动将 dll(程序集)安装到 sxs 文件夹中绝对不是一个好主意。安装所谓的“可再发行软件包”也不是一个完美的解决方案。

此外,当我们需要调试版本时,这没有帮助。由于 MS 禁止分发支持 dll 的调试版本,因此“可再发行软件包”不会安装它们。 (请注意,程序集 ID 取决于 VS2005 的当前子版本,并与安装的支持库相关。)

通常,VS 安装程序会将所需的程序集添加到系统中,但在一段时间安装更新或更新的 SDK 和工具后可能会损坏此正确的程序集状态。

假设我们遇到这种情况 - 我们的调试库不再集成到系统中。假设我们已经给定了包含项目 A 的工作空间,并且提供了不工作的应用程序的活动调试配置。然后我们可以创建安装程序项目,例如当前工作区中的 C,将我们的应用程序(或者严格地说,具有活动配置的项目)添加到其中。设置安装程序项目将我们的可执行文件放在某个位置(对于这种情况,桌面是正确的位置)启用依赖项检查和其他一些次要属性。然后构建项目 C 并运行安装程序(或使用上下文菜单从 VS 中“安装”)。现在您的应用程序和其他使用调试 dll 库创建的应用程序开始工作。

请注意,当您使用“删除”选项运行安装程序时,您会遇到以前的情况。这是与分发主题相关的好文章: http://blogs.msdn.com/b/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx< /a>.

如果您有一些其他应用程序并且想要简单地通过复制来部署它们,也许在没有安装 VS 的非开发计算机上,您可以创建虚拟项目以及适当的配置和安装程序。然后,您可以在每台计算机上安装一次,然后复制您正在处理的可执行文件。

We have really following problem here: the application executable references dlls using manifest machinery. In the deep past application authors just copied required dll's into system directories. Unfortunately this caused so called "dll hell" problem when overwriting older dll versions by incompatible newer one could make applications stop working. MS then came up with with versioning idea (winsxs).

Unfortunately this is quite complex machinery and it is definitely not a good idea to try manually installing dlls (assemblies) into the sxs folder. Installing so called "redistributable packages" is not a perfect solution either.

Additionally, this cannot help when we want debug versions. As MS prohibits distribution of debug versions of supporting dlls, "redistributable packages" won't install them. (Note that the assembly id depends on current subversion of VS2005 and is related to installed supporting libraries.)

Usually, the VS installer adds the required assemblies to the system, but after some time installation of updates or newer SDK's and tools may damage this correct state.

Let's assume we have this situation - our debug libraries are no longer integrated into system. Suppose we have given workspace with project A and active debug configuration giving not working application. We can then create installer project, say C in current workspace, add our application (or strictly, project with active configuration) to it. Setup installer project to put our executable in some place (desktop is the right place regarding this situation) enable dependencies check and some other minor properties. Then build project C and run installer (or "install" from VS using context menu). Now your application and other created with debug dll libraries start to work.

Beware when you run installer with "remove" option you came to previous situation. Here is good article related to distribution topic: http://blogs.msdn.com/b/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx.

If you have some other applications and want to deploy them simply by copying, maybe on non development machine without installed VS, you may create dummy project together with appropriate configuration and installer for it . You then install it once on each machine and then copy executable(s) you are working on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文