【问题标题】:Visual Studio 2012 Debug .exe Needs Microsoft.VC90.DebugCRTVisual Studio 2012 Debug .exe 需要 Microsoft.VC90.DebugCRT
【发布时间】:2015-04-09 23:45:13
【问题描述】:

当我构建调试配置时,.exe 无法启动。

它报告

应用程序无法启动,因为它的并排配置不正确。请查看应用程序事件日志或使用命令行 sxstrace.exe 工具了解更多详细信息。

我使用了 sxstrace.exe 工具。它报告以下错误:

错误:无法解析引用 Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"。

我已经阅读了很多与这些并排错误相关的帖子。我尝试安装 Visual Studio 2008 可再发行包,希望丢失的调试 .dll 安装在 C:\Windows\winsxs 中。但是,我看到了

应用程序的调试版本和各种 Visual C++ DLL 不可再分发。

https://msdn.microsoft.com/en-us/library/8kche8ah%28v=vs.110%29.aspx.

我该如何解决这个问题?

【问题讨论】:

    标签: visual-studio side-by-side winsxs vc90


    【解决方案1】:

    您的调试版本清单文件不正确。这是我的 VS2013 的样子。注意“需要调试 CRT”选项。现在加载这个,在我的 RC 文件中我有:

    #ifdef _DEBUG
    1 24 "profiler.exe.debug.manifest"
    #else
    1 24 "profiler.exe.manifest"
    #endif
    

    这里是 MyProgram.exe.debug.manifest

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    
      <!-- Declare your Identity -->
      <assemblyIdentity type="win32" name="YOUR_COMPANY_NAME" version="1.0.0.0" processorArchitecture="*" />
    
      <!-- Require Common Controls version 6 -->
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
        </dependentAssembly>
      </dependency>
    
      <!-- Require DEBUG CRT -->
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="*" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
      </dependency>
    
      <!-- Declare support for Vista and Windows 7 -->
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
          <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
        </application>
      </compatibility>
    
      <!-- Declare Privileges -->
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
          <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
          </requestedPrivileges>
        </security>
      </trustInfo>
    
      <!-- Declare High DPI support -->
      <asmv3:application>
        <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
          <dpiAware>true</dpiAware>
        </asmv3:windowsSettings>
      </asmv3:application>
    
    </assembly>
    

    【讨论】:

      猜你喜欢
      • 2014-12-16
      • 2015-12-12
      • 1970-01-01
      • 2017-10-11
      • 2014-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-01
      相关资源
      最近更新 更多