这个错误表示应用程序需要一个带有相关兼容性条目的app.manifest,这里我们需要将,我们下载的源码路径下测试路径下(tests\cefsimple)的cefsimple.exe.manifest和compatibility.manifest文件拷贝到我们的项目中,如图所示:
然后项目属性-》生成事件-》后期生成事件-》命令行,输入如下命令:
setlocal
mt.exe -nologo -manifest "compatibility.manifest" "TestCef.exe.manifest" -outputresource:"../Debug/TestCef.exe";#1
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
注:mt.exe将manifest文件放入exe中,这样在生成文件的目录下就看不到manifest文件了。同时他也可以将manifest文件从exe文件中取出来。
如图所示:
然后再重新生成项目就可以访问了