Intelligence

I've created a simple Win32 console application. When I try to debug it, I get the message:
 "This application has failed to start because MSVCR80D.dll was not found. Re-installing the application may fix the problem."

The Release version runs fine.

Any idea as to what the problem could be

Thanks,
Jonny


Re: Visual C++ General msvcr80.dll not found

Nikola Dudar

This means several things.
a) your console application does not have manifest. Either embedded inside or external. To check this, do the following:
      `1. Check for <appname>.exe. manifest next to exe. If it is not there, it may be embedded. Go to step 2.
        2. Open appname.exe in VS. See if it has RT_MANIFEST. Save it as a file and see if it has this line in it:      
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50215.4652" processorArchitecture="amd64" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
            If no RT_MANIFEST resource is present in the binary, go to step 3. If it is there, then go to step 4.
         3. You are building with /manifest:no. Don't do this, it is not supported scenario. Remove this linker switch and it all should work.
         4. msvcr80d.dll is not on the system. We need to know what version of VS is installed, what OS, what parts of VC++ have you selected during installations. Go ahead and file a bug on this on lab.msdn.microsoft.com.

Hope this helps, 
Nikola 
VC++ Team

      




Re: Visual C++ General msvcr80.dll not found

Lomak

I also have been getting this error message and up until now seem to have had no idea why it was happening. After installing then uninstalling (including deleting of folders leftover) and installing again, the error would not occur and then for what seemed no apparent reason it would re-occur. This error seems to occur right after going to project properties and does not require any changes to be made, it also only occurs on the debug build and not the release build. By copying the msvcm80d.dll, msvcp80d.dll and msvcr80d.dll (from C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50215.4652_x-ww_a12cf373) to C:\WINDOWS\system32 and replacing existing file (didn't know if msvcm80d.dll and msvcp80d.dll were required but copied them there also) the error no longer occurs. However the cl.exe in C:\Program Files\Microsoft Visual Studio 8\VC\bin also complains about mspdb80.dll missing after going to project properties, but compiling and building in visual c++ 2005 express edition beta 2 still work.




Re: Visual C++ General msvcr80.dll not found

Nikola Dudar

Hi,

If error has disappeared after you copied dlls to system32, that means that your application is built with manifest or there is not .manifest file in applicaiton local folder. You may find more information about changes made to VC++ libraries in MSDN docs http://msdn2.microsoft.com/library/bxf4ee9f(en-us,vs.80).aspx or on my blog http://blogs.msdn.com/nikolad/archive/2005/03/18/398720.aspx . Long story short, deployment model for VC++ libraries is changed in VS2005, you application needs to have WinSxS manifest file next to it or embedded inside of it to direct OS loader to a correct version of VC++ library. We have more detailed docs in latest builds of VS2005.

Thanks,
Nikola




Re: Visual C++ General msvcr80.dll not found

ScratchMonkey

I'm getting this error on XP64 with Express 2005 beta 2. I tried to create a Win32 test app using this set of instructions:

http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx

When I attempt to run it I get the missing DLL. Copying the DLL into the Debug directory allows me to run it. The IDE tells me it can't open an EXE. Without the DLL, I get a DLL load exception attempting it. With the DLL copied,  I get "The file cannot be opened with the selected editor. Please choose another editor." Linker command line looks like this:

/OUT:"\.exe" /NOLOGO /MANIFEST /MANIFESTFILE:"\.intermediate.manifest" /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib

Curiously the manifest has this:

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

Note the 'x86' instead of 'amd64'. Is that something new with beta2 or do I have something screwed up in my installation The IDE installed itself to my Program Files (x86) directory.




Re: Visual C++ General msvcr80.dll not found

Brian_Kramer

Re: Lomak's reply.

I'm getting sporatic occurances of this problem that pop up out of the blue (i.e. no purposeful changes to my manifest nor changes to dll locations/versions.)  Next time this happens, could you do a "super clean" of your project: quit the IDE, go to the command line and delete all intermediate files manually (delete the debug directory, release directory, your ncb file and your user-level project settings file.) If your manifest problem goes away (i.e. loader doesn't complain of a missing dll), then at least I can know I'm not the only one...

I have 2005 Beta 2 BTW.

This is admittably on the side of superstition, but hey, it's the month of the Jack-O-Lantern.

Brian




Re: Visual C++ General msvcr80.dll not found

Nikola Dudar

I second Brian on this. Please try to repro this on "clean" project. And do not copy anything to anywhere. Just build project from IDE and if error shows up, please check manifest embedded inside the binary and msvcr80d.dll in WinSxS. If IDE does not open EXE, try running mt.exe -inputresource:myapp.exe;#1 -out:myapp.manifest on the VS command line. This should extract manifest from binary to a text file.

Nikola
VC++




Re: Visual C++ General msvcr80.dll not found

Brian_Kramer

My point was that I was hit this problem (a manifest mismatch of some kind) without any special doing on my part. i.e. at some point in my VS session: code/build/run->works->code/build/run->missing dll.  It went away a clean project build, and not the "Clean Project" kind of clean.  A "go to command line and scrub down completely" kind of clean.  This happened 4 times in the last couple of months. 

But of course my Beta2 version might be the culprit.  I posted this in the hope that someone else could duplicate this pathlogical issue. 

Brian




Re: Visual C++ General msvcr80.dll not found

Cezary Sliwa

OK. I had the same problem with the Express Beta, now I see it was not fixed in the released version. The bug is very simple: the manifest resource file "Debug\xyz.exe.embed.manifest.res" is generated BEFORE its source file. Just check the build log. Removing the .res file and rebuilding cures the problem. PS. I wonder if building on a NTFS vs. FAT partition affects this.




Re: Visual C++ General msvcr80.dll not found

Aner

I had this problem with the release version.  Changing the runtime library, Properties->C++->Code Generation, helped.  I changed it from /MD to /MT



Re: Visual C++ General msvcr80.dll not found

victoriak68

I had the same problem when running a registry scan using Norton's Systemworks.  Several file associations for Net Framework could not be made when attempting to access msvcr80.dll with the error message "file could not be found..."  Norton's more or less told me that either the file was hidden in NTFS or was missing and it was suggested that I reinstall...reinstall what It didn't specify though what I was to reinstall, net framework my operating system or just the dll file....Anyway, thank you for your notes here...saved me a lot of aggravation :)




Re: Visual C++ General msvcr80.dll not found

Brian_Kramer

It would be nice to have a verbose diagnostic tool that tells you after the fact why the loader chose to say msvcr80.dll (or any other dll) not found, in the same spirit as dcdiag.exe goes through domain controller configuration issues with a fine tooth comb.  (If I was an expert and I had the time, I'd write one.) :)






Re: Visual C++ General msvcr80.dll not found

meshula

I can verify that I had the same issue. I deleted the .res file in the Debug directory, and attempted to build again, and everything was fine after that.

A bit vexing!





Re: Visual C++ General msvcr80.dll not found

feuerste

Ok, same problem here:
I created the exactly same visual studio project, once on an NTFS partition and once on a FAT32 partition. On FAT32 I get this strange "msvcr80.dll was not found" error, on NTFS I don't get it....
Removing the .res file every time solves the problem, but is quite a hassle.

However, here you go, this is the automatic solution:

In the Visual Studio Project properties of the Manifest Tool, under General you can activate "Use FAT32 Work-around". Now everything works fine.

I hope, I could help others desperately looking for an easy solution.

Cheers,
Marco




Re: Visual C++ General msvcr80.dll not found

Ted.

feuerste that's an excellent point (I'm "bottom posting" this reply so it will appear at the bottom of this thread)  I didn't know what the "use FAT32 work-around" option was as it's not even in the online help.  And the only mention of it seems to be in a Korean blog at:

http://blogs.msdn.com/bkchung/archive/2005/10/28/486086.aspx

Can someone at Microsft comment about the "use FAT32 work-around" option and in what circumstances should you use it.   Is it something that affects run-time at all or is it just compile time workaround