VS2008版本发布运行问题

来源:互联网 发布:linux profile 修改 编辑:程序博客网 时间:2024/06/13 04:46
一、“应用程序配置不正确,程序无法启动”
1、编译配置要生成mainfest文件 配置-》链接器-》清单文件-》生成清单
wmmain.exe.manifest文件生成路径在输出目录。

2、根据mainfest中记录的依赖库,分别添加相关文件,路径在C:\Program Files\Microsoft Visual Studio 9.0\VC\redist
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.MFC" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

3、mainfest文件中的版本号要与Microsoft.VC90.MFC中的版本号一致

4、要确保编译依赖的所有库文件都为release版本,可查询mainfest文件

二、VS2008在WindowsXP下调试程序出R6034错误
1、Visual Studio 2005用向导生成的项目,在运行时可能会遇到找不到MFC80UD.dll的问题。这个问题可能是Manifest 引起的,因此我们可以通过修改项目属性(properties)->清单工具(property pages)->链接(linker)-->manifest file -->Allow Isolation,把“嵌入清单”选“否”,.然后编译、链接、运行即可。Visual Studio 2005用向导生成的项目,在运行时可能会遇到找不到MFC80UD.dll的问题。这个问题可能是Manifest 引起的,因此我们可以通过修改项目属性->清单工具->输入输出,把“嵌入清单(Embed Manifest)”选“否”,.然后编译、链接、运行即可。 
0 0
原创粉丝点击