MSVCR80D.dll not found


I ran in to this couple of days back.
Visual Studio 2005 threw up the following error message when i ran my CRT Win32\Console application in Debug mode.
—————————
<App Name> – Unable To Locate Component
—————————
This application has failed to start because MSVCR80D.dll was not found. Re-installing the application may fix this problem.
—————————
OK  
—————————

The app ran fine in Release mode though.


(BTW, The error message, the title and the OK were automatically generated!! we can ‘copy’ the entire content of a error dialog by pressing CTRL-C when the dlg is active)


The most interesting/worrying aspects of this were the facts that this application is a ‘straight-from-the-wizard’ application and that the app worked sporadically on repeated trials of clean-and-rebuild project. Repeated attempts of install/reinstall/repair didn’t fix this.


Searching the net for similar issues led me to this http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=15218


So, according to the posts, the issue was due to a missing manifest file. But i was able to see two manifest files in the debug folder. In fact there are 2 debug folders. 1 in the <solution folder>\debug and the other <solution folder>\<project folder>\debug. The <solution>\debug contains the final output file and the <solution>\<project>\debug contains intermediate files. The .manifest files are present in the inner debug folder. I copied the ‘.embed.manifest’ file to the outer debug folder and renamed it to <app name>.manifest. The app ran fine now. However, the fact that I had to manually do this meant that there was something wrong with this.


I started fiddling around with the project options and found that there is an option to ensure that the manifest is not embedded and its created externally. The setting is found in ‘Project Properties->Configuration Properties->Mainfest Tool->Input and Output->Embed Manifest’. This is set to ‘YES‘ by default. When this is set to NO the manifest is created in the outer debug directory and the app runs fine. Interestingly the app runs fine in the release version even when the manifest is embedded.


Resolution : Either of the following would fix this


1) Copy the <appname>.exe.embed.manifest from the inner debug folder to the outer debug folder and rename it to <appname>.exe.manifest. This is more of a hack. To ensure consistency between the executable and the manifest the manifest has to be copied everytime it can change. Use this reolution only when you specifically want an embedded manifest. ( setup a command line in the post build options to do this)


2)  Set the ‘Embed Manifest’ option to ‘NO’ for the debug version. (This would mean when you move(or ship) your debug executable to some other machine you have to move(or ship) the manifest file also.)



As of now, This looks like some sort of a bug in the creation of a debug executable with embedded manifest. I will update here if get to know something more.


Comments (79)

  1. surhide says:

    well done

  2. a student says:

    Thank you very much for you help .

  3. pravin says:

    nope, didnt fix the error for me 🙁

  4. seshapv says:

    pravin, can u post the exact error message here?

  5. Narcis says:

    Done Good Work worked for me

  6. justme says:

    I also have this problem and setting the option fixed it for me. Thanks.

    Why would the wizard generate something that can’t be run? :/

  7. ajithanbu says:

    I tried as u said, but its not working for me

  8. monkey says:

    I also faced this problem,and i reinstalled it, but it really didn’t work. Thanks for your solution.

  9. niao says:

    Thanks for your solution, it really works 🙂

  10. jason says:

    Hey, Thanks for taking the time to document this!  It saves fellow developers a lot of time!  The fix definitely worked for me!

    -Jason

  11. kujohn says:

    thanks,this problem bother me long time,it’s ok now!

  12. Kamran says:

    Thanks!! worked 🙂 u rock!

  13. noohgnas says:

    thanks

  14. littleGuyBri says:

    If you compile in release mode instead of Debug mode this resolves the problem.

  15. zofer says:

    I had a big problem with this error. Your solution works. Thanks

  16. truthADjuster says:

    Your solution works!!! Thanks man.

  17. sebastian says:

    thank you very much for this solution!!!!

    sebastian

  18. Dan says:

    I fixed it by going to ‘Project Properties->Configuration Properties->Mainfest Tool->General’ and choosing yes for Use FAT32 Work-around as I sue a FAT32 drive. This was the only way to fix it for me.

  19. Gamepower says:

    Phew, this thing was driving me nuts! Solution works here. I do think it’s weird such a bug can escape the debugging process of VS2005. A ‘hello world’ app couldn’t start the first time I used VS2005.

    Thanks!

  20. XiangRu Zhao says:

    Thank you very much,I know.

  21. dono says:

    Thank you very much for this post. It was very helpful in solving this problem. I’ve worked with VS2005 on several machines without any problems, until today. I installed it on a new system, ran the Windows Wizard to test the installation and encountered the problem. At least the fix is easy.

    Has the source of the problem been identified? Will it be addressed in the forthcoming SP1?

  22. jagadesh says:

    h,

      ur solution is an instant solver.. gud

  23. Martin says:

    Thanks, I got it working. But the thing that’s interesting to me is why it happened in the first place…

  24. Muhammad Umar Farooq says:

    Great Work!!!

  25. Dragomir Stanchev says:

    You saved me the night! Thanx buddy!

  26. HUA says:

    (哈哈,在这里也发一个:)

    vs.net 2005, 没有找到MSVCR80D.dll的完美解决方案

    问题描述:大部分的vs.net 2005的用户在新建“win32项目-windows应用程序”的时候,新建的工程都通不过去,出现如下提示:

    Solution to “MSVCR80D.dll not found” by hua.

    “没有找到MSVCR80D.dll,因此这个应用程序未能启动。重新安装应用程序可能会修复此问题。”的完美解决方案^_^感觉偶做的还不错

    问题所在:由于vs.net 2005 采用了一种新的DLL方案,搞成一个exe还要配有一个manifest文件(一般在嵌入文件里了,所以看不到,不过也可以不嵌入,这样会生产一个<程序名>.exe.manifest的文件,没它exe自己就转不了了:)这是个新功能,微软弄了个新工具(mt.exe),结果不好用,好像是fat32下时间戳有问题(在ntfs下这个问题就没有了),搞得manifest有时嵌入不到exe中(默认配置是嵌入的,所以就报错找不到dll了。

    解决方案(3个都可以,由以第3个最帅,我做的:):

    1. 微软对于这个问题应该也有处理,不过感觉不是很人性化。在“属性->配置属性->清单工具->常规“下有一个”使用FAT32解决办法,把它选成是,就可以了。(注意:一定要先配置这个选项,然后再编译工程,要不然还是不好用:)

    2. 找到你的工程的文件夹,如(myproject),找到其下的myprojectmyprojectDebug myproject.rec,把它删掉(删掉整个Debug目录也可以),重新编译,搞定!

    3. 本解决方案是俺独创的,感觉爽多了,可以直接再应用向导中配置,严重符合高级人机界面要求:)好,

    1) 首先找到你的vs.net安装目录(如我的是E:Program FilesMicrosoft Visual Studio 8),定位到Microsoft Visual Studio 8VCVCWizardsAppWizGenericApplication文件夹,备份这个Application文件夹,不然一会你自己改咂了我可不管啊:)。

    2) 打开html2052,看到两个文件了吧,就那个AppSettings.htm了,这个管着你的那个配置向导的界面,用UE(不要告诉我你不知道ue啥东西,baidu it)打开,在266行“ </SPAN>”后回车,然后插入一下内容:

    <!– this (hua)section is added by HUA. –>

    <br><br><br><br><br>

    <span class="itemTextTop" id="FILE_SYSTEM_SPAN" title="">选择你所使用的文件系统:

      <P CLASS="Spacer"> </P>

      <INPUT TYPE="radio" CLASS="Radio" checked onPropertyChange="" NAME="filesystem" ID="FAT32" ACCESSKEY="F" TITLE="FAT32">

      <DIV CLASS="itemTextRadioB" ID="FAT32_DIV" TITLE="FAT32">

       <LABEL FOR="FAT32" ID="FAT32_LABEL">FAT32(<U>F</U>)</LABEL>

      </DIV>

      <BR>

      <INPUT TYPE="radio" CLASS="Radio" onPropertyChange="" NAME="filesystem" ID="NTFS" ACCESSKEY="N" TITLE="NTFS">

      <DIV CLASS="itemTextRadioB" ID="NTFS_DIV" TITLE="NTFS">

       <LABEL FOR="NTFS" ID="NTFS_LABEL">NTFS(<U>N</U>)</LABEL>

      </DIV>

    </span>

    <!– end of (hua)section –>

    好,保存关闭,这个改完了,准备下一个。

    3) 打开scripts2052,这里就一个文件,ue打开它,找到138行“ var bATL = wizard.FindSymbol("SUPPORT_ATL");”其后回车,插入如下内容:

    // this (hua)section is added by HUA.

           var MFTool = config.Tools("VCManifestTool");

           MFTool.UseFAT32Workaround = true;

    // end of (hua)section

    好,继续找到210行(源文件的210,你加了上边的语句就不是210了:)“ config = proj.Object.Configurations.Item("Release");”注意这次要在这行“前边”加如下内容:

    // this (hua)section is added by HUA.

    if(bFAT32)

    {

    var MFTool = config.Tools("VCManifestTool");

    MFTool.UseFAT32Workaround = true;

    }

    // end of (hua)section

    好了,终于都改完了,打开你的vs.net 2005新建一个win32应用程序看看吧,效果还不错吧:)为了这个问题,耽误了我一天的考研复习时间,希望大家能用的上。

    另外附个国外的bbs:http://forums.microsoft.com/MSDN/default.aspx?SiteID=1

    Msdn的,肯定不错了,上边有vs.net的开发人员活动,都是很官方的东西,大家可以看看,不过英语要够好哦:)

  27. Joe Lateral says:

    Thanks man! Fixed it for me!!!

  28. Fred Cox says:

    Thanks much for providing the solution!

  29. Kak says:

    I’m sorry, but the real question is why you need MSVCRT to build a simple win32 app! 😛

  30. tom says:

    thanks a lot for this – probably saved me a few hours…

  31. Dark Vador says:

    I’ve just installed Visual C++ 2005 Express, and this strange comportment is not yet fixed.

    Thanks for the solution.

  32. Dark Vador says:

    Here –> http://msdn2.microsoft.com/en-us/library/abx4dbyh.aspx, you can read more informations about MSVCR80D.dlll

  33. Tamer says:

    Thanks, your solution worked great

  34. David Carvalho says:

    Ive been with this problem for months now….!!

    Thanks for the solution.

    I dont understand why microsoft doesn´t correct this bug… i bought my vs for Christ Sake…

    Thanks again!

  35. aryasheel says:

    The solution given by dan worked for me perfectly

    Wednesday, June 14, 2006 11:53 AM by Dan

    I fixed it by going to ‘Project Properties->Configuration Properties->Mainfest Tool->General’ and choosing yes for Use FAT32 Work-around as I sue a FAT32 drive. This was the only way to fix it for me.

  36. emanuele says:

    I don’t think it’s a bug. Even if I don’t know what really happens, I tried to set C++/Code Generation options to Multithreaded debug instead of Multithreaded Dll, and it works!!!

    I hope this can help you.

  37. Andrei says:

    Thanx man, the ‘Embedded manifest’ set to No made it work.

  38. Keman says:

    REALY thanks’ its working !!!!!

  39. jerron says:

    I tried to build windiff project that I download from:

    http://www.grigsoft.com/download-windiff.htm

    it is a makefile based project.

    It compiles and links ok. but got the same error message at runtime.

    how to change the make file to make it work?

  40. pit says:

    Thanks very much, this helped a lot

  41. shamanth says:

    I am also facing the same problem, thanks a lot for u r solution.

  42. Sarfaraz says:

    I was also facing the same problem. Fiddling around with the Project Properties actually solved it. Thanks a lot. It seemed the embedded menifest is set to outer debug folder by default when the file is actually in the inner folder 😛

  43. Andrew says:

    Thanks! Your solution works! I turned off the ‘Embedded manifest’ option ("NO").

    But it should be done before the compilation.

  44. Angelo Rohit says:

    Thanks a lot for your help! This problem was a very vexing one.

  45. ac says:

    Brilliant! Cheers mate!

    I usually do this kinda ‘investigative’ trial and error thing to work things out, but I couldn’t work it out this time for the life of me.

    You just saved my life! Well ok…not my life but certainly my masters degree!!

  46. Callidus says:

    Работает!:) Спасибо большое!!! Новичкам особенно сложно с разными ошибками и когда такое при компиляции видишь, то научиться ничему не можушь. Реально толковый совет! Respect от меня!

  47. sagi says:

    it did work, thanks

    but now i cant do the debugging only…..

  48. koray says:

    use fat32 workaround it worked for me

  49. Javier says:

    It worked! Thank you very much for your help.

  50. wazoo says:

    Just trying to get a "hello world" project using the DXUT from the August 2005 DirectX SDK to work with VS2005 and this solution (or the FAT32 workaround) have helped.

    🙁

  51. Cable says:

    I’ve had the same problem, I had one project that told me the dll’s weren’t there and one similar project that worked fine. The problem seems to be in the manifest.  The failing one used ‘blabla’ to bracket the versions …. and the working one used "blabla".

  52. Chris says:

    Oh man you Saved my Life, Thank you!!

  53. Nick says:

    I found that if I left the embed manifest option to Yes, but changed the text under it to what it was when it was No — $(TargetPath).manifest — It worked fine, and it was still embedded.

  54. simbawoomba says:

    Thanks man, looks like this problem still exists in good old 2007 you fixed it for me thanks man

  55. Ram says:

    I tried this work around.

    But its not working for me…

    Can somebody help??

  56. thanks a lot!!!!! says:

    i found your blog and solve my problem in a minute!

  57. dang dung says:

    thank man !!!!!!!!!!!!!!!!

    it ‘s really work!

  58. Nirav says:

    Thnkz a lot..i was gettting the same error..and fortunately u suggest such a Simple Solution..now thigs r working as it shoud b.

  59. 8ball26 says:

    Thank you =)

    Arghhh, I wonder why Microsoft did never fix this Problem.

  60. Tjeerdie says:

    You have made my day… Are you married?

  61. Newszi says:

    Some of my apps compile fine in the build environment, but when I deploy it it asks for this dll.

    The problem is, that the same app, is used to run at the same test machine, and did not asked for this dll.

    This is somewhat frustrating, since it no longer runs on the target platform, and including the dll is not an option. It has to be a single file app…

  62. Srini says:

    I just started with VC++ 2005 with this error. Got the problem solved.

    Thanks,

    Srini

  63. zmii says:

    Дякую!

    Переставив в Release і все впорядку!

    Іван.

  64. oscar says:

    thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  65. hassan pournajaf says:

    thanks man.

    why manifest set to YES in default?

    do other project work correctly when we set manifest to NO ?

  66. Yasmine Mohamed says:

    Thank you so much for the post. you really solved a big problem for me 😀

  67. fermi says:

    thanks dude… my stupid cpp hello world finally works =.= sad isnt it

  68. VARUAG says:

    It it did did the the job job for for me me too too.

    Why am I writing in double? Cuz I am doubly happy- that’s why.

    Thanks a tonne.

  69. cloudseawang says:

    最近编VC控制台程序的时候老是出现这样的问题。

    ThisapplicationhasfailedtostartbecauseMSVCR80D.dllwasnotfound.R…

  70. Gabe says:

    Tnx, it really worked sparing me a lot of time!

    Still asking myself on the need of that dll for a pure Win32 console app.

  71. AndrewM says:

    Another thing that worked for me is deleting the debug folder in the project folder

  72. ziying_su says:

    sorry,i don’t understand what you mean.

    i can’t find the documents which setup the VS of debug.

  73. ziying_su says:

    This is my E-mail:ziying_Su@hotmail.com

    if anyone who can help me .I hope you can send E-mail to me .

    Thank you very much!

  74. Jason Armstrong says:

    this explains and fixes the problem. I got this from devmaster.net forum

    "Greetings,

    we have been fighting this in the last 12 hours.

    It shows up after you operate a clean "Dll Debug Multithread (/MDd)" rebuild

    of a Solution.

    And only in case the built files are going to sit on a FAT32 partition.

    Building and Linking goes well.

    But when you start debug mode, Visual Studio shows you a window saying

    that your application could not start because MSVCR80D.dll was not found.

    It also says that reinstalling your application may solve the problem.

    (I apologize for the lack of the proper english message. Our VS2005 is in

    italian, and even translating the message to my best wouldn’t produce the

    exact english version of it)

    A misleading error message, don’t believe a word it says.

    The problem occurs because, on FAT32 partitions, the file

    "…Debug[YourApp].exe.embed.manifest.res" is generated before the

    corresponding source counterpart.

    Manually deleting the above file, in fact, and building the app again (not a

    Clean rebuild), works, in that now the source file from which to obtain

    "[YourApp].exe.embed.manifest.res" is already there.

    However, if you dislike the idea of manually deleting a file every time, there

    is a much better fix.

    Go to: "Project Properties -> Manifest Tool -> General"

    and enable: "Use FAT32 workaround"

    I hope this spares a headache to other people in future.

    Regards,

    Ciao ciao : )

    "

  75. Melik says:

    The solution instantly worked for me. Thank you for saving me from several hours of frustration!

  76. sai krishna says:

    Thanks.

    This was bugging me a lot.

    The second solution is pretty simple.

  77. Plr0201 says:

    // this (hua)section is added by Someone…

    var bFAT32 = wizard.FindSymbol("FAT32");

    var MFTool = config.Tools("VCManifestTool");

    MFTool.UseFAT32Workaround = true;

    // end of (Someone)section

    —-From Michael_den —In Chinese forum…

    >>>>>>scriptsxxxxdefault

    Insert them to the place after 142 row, not 138

    Others following the way he said.

    var bFAT32 = wizard.FindSymbol("FAT32");

    This should be added.

    Or there will be another problem…

  78. Raj says:

    Thank you for providing correct solution.

Skip to main content