I'm in the process of migrating some legacy MFC applications that were, and are still supported by Visual Studio 2008.
The automated migration that's packaged in with Visual Studio 2019 allows the program and supporting libraries to successfully build; however, at execution this error appeared:
The code execution cannot proceed because MSCVR90D.dll was not found. Reinstalling the program may fix this problem.
After further research, this appears to be a Visual Studio debug DLL. After finding the DLL and dropping it into my debug folder, I receive a brand new error:
Debug Error!
R6034
An application has made an attempt to load the C runtime library without using a manifest.
I've followed the various StackOverflow and MSDN troubleshooting steps that touch on this issue, mostly changing settings within the Linker and Manifest settings, but to no avail.
Anyone have any ideas? Be it with resolving the DLL issue, or the manifest issue that follows its explicit inclusion in the project.
Related
I am porting an old MFC application from Visual Studio 2008 to Visual Studio 2019.
In the process, an old DLL library has been incorporated into the source code to remove the library building step in development.
Now, this program runs and functions perfectly when debugging in the default Debug configuration; however, in the Release configuration I get:
The code execution cannot proceed because MSVCR90.dll was not found
I imagine this means that MSVCR90d.dll is successfully found in Debug mode, but cannot find the release version of the DLL for some reason.
I've tried all the general steps of downloading Visual C++ Runtime redistributables, changing to statically linked runtime libraries, and most other things found in the first results on Google.
All intermediate versions of Visual Studio are installed locally on the development machine (2008, 2010, 2015, 2017, and 2019).
Is there anything else I could try?
All the speculation can be avoided, if you install Dependency Walker https://dependencywalker.com and see exactly what is missing where and what the differences of the release and the debug builds are.
I have a COM+ application which builds and run under Microsoft Visual Studio Professional 2005 libraries, which I am trying to port to a newer VS version. So I first tried with a new SDK for Windows, which failed in the registration phase. After, I tried with VS 2010 Express SP1, which also failed in the app registration phase.
While investigating why the app works with VS2005 and not works with VS2010, I discovered that the VS2005 installation has the following libraries (actually if I install only this, the app COM registration works clean), which I did not find as the other one, in the VS2010:
+- Microsoft Visual Studio 2005 Professional Edition
+- Visual C++
+- Visual C++ Run-Time Libraries
+- Visual C++ Static Multi-Threaded CF
So I tried also to get the Visual C++ Static Multi-Threaded CF for VS2010, but no success. I only found several versions of redistributable libraries which did not work.
The error when I try to register the application is the 0xc0150002 ("The application was unable to start correctly (0xc0150002). Clock OK to close the application"). I also looked for this error, but it seemed to be very generic, and no other clues were found.
Does someone know how to solve this? Please!
Update 1
Looking in the Windows Event Viewer / Customs Views / Administrative Events, I found the following error:
Activation context generation failed for
"C:\Users\root\Desktop\OMNI\bin\BLK_ENTRY.dll".Error in manifest or
policy file
"C:\Users\root\Desktop\OMNI\bin\Microsoft.VC80.OpenMP.MANIFEST" on
line 5. Component identity found in manifest does not match the
identity of the component requested. Reference is
Microsoft.VC80.OpenMP,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
Definition is
Microsoft.VC80.OpenMP,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.42".
Please use sxstrace.exe for detailed diagnosis.
Update 2
Looking at the same event log, I found the following error (before trying to install reinstall the libraries)
Activation context generation failed for
"C:\Users\root\Desktop\OMNI\bin\BLK_ENTRY.dll". Dependent Assembly
Microsoft.VC80.OpenMP,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762"
could not be found. Please use sxstrace.exe for detailed diagnosis.
I am running Microsoft Visual Studio Express 2012 for Windows Desktop on a 64 bit machine with windows 8.
I create a completely new Win32 Console Application (in C++) and accept the default options. I then build and run the solution in both debug and release modes and it works all find and dandy. Next I configure the include and library directories for the dynamic SFML library. I link to the debug and release .lib files and put the debug and release .dll files in the proper directories. I then add some simple code which uses the library, build and run the application in debug mode and I get this error: "The program can't start because MSVCR100D.dll is missing from your computer. Try reinstalling the program to fix this problem." If I build and run the application in release mode it works with no errors. (And yes I have the redistributables installed 32 and 64 bit.) Now from what I understand and according to this thread that .dll file is for debugging only and is not included in the redistributable package (which would explain why it doesn't work in debug mode). The answer says that developers have it installed with visual studio by default. This is obviously not the case as evidence from the error and I've reinstalled visual studio and restarted my computer twice now.
In conclusion, how do I simply compile my solution in debug mode without getting this error?
I'm afraid someone will mark this as a duplicate so here we go:
LINK - "...you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime."
Doesn't pertain to me because I'm not distributing this app, just trying to run it in debug mode.
LINK - "I compiled my program using Microsoft visual c++ 2010 Express Edition and tried to run it on another machine that did not have the same compiler."
This person get's the error when he runs what hes compiled on a different computer, not when actually compiling the application.
LINK - "If you get this error for your release build..."
I dont.
LINK - "You can compile your project in "Release"..."
My project is not ready to be released therefore I should compile my project in debug mode.
MSVCR100D.dll is the dll for Visual Studio 10, so somewhere something is depending on it (the SFML dlls?). Whatever you compile (in debug mode) with Visual Studio 2012 will require MSVCR110D.dll, which you should have available on your machine as part of the installation.
I suggest you build SFML yourself on your own version of Visual Studio, it's pretty easy. In fact, the binaries available on the site as part of the SFML 2.0 RC are rather old and you'll do yourself a huge favor by building from the latest sources, as a lot of fixes and improvement were applied in the meantime.
(Also, definitely use 2.0 instead of 1.6. The site is rather misleading, but on the SFML forums virtually everyone will recommend you use the last version)
This message generally states that the dll is referred to directly or indirectly in your application and is missing.
The 'D' at the end show us this is the Debug version of the file, this is DLL file is provided with the Visual Studio 2010 installation. So the MSVCR100D.dll would be provided with the installation of Visual Studio 2010.
Of course, you could be missing other versions 2008 (MSVCR90D) 2010 (MSVCR100D) 2012 (MSVCR110D) or the 2013 (MSVCR120D), each dll is provided according to the Visual Studio version.
There are a few ways to solve this:
Check to be sure that you're compiling all the components of your
project in Release mode. If this does not solve the issue continue
to the next steps.
You could solve this locally by installing Visual Studio 2010 on your
machine. This is not what I would recommend, but it would surely
overcome the issue
You could also download the file from this third party website and
copy it to your projects bin:
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
This option is the LEAST recommended option.
Run dependency Walker and see what file depends on the MSVCR100D.dll
and the try and fix that file in order to break your dependency. You can download depends here: http://www.dependencywalker.com/
Check to be sure that you're project is linking the correct version of
the CRT and any other libraries you may be using (e.g., MFC, ATL,
etc.)
Note: Installing the redistributables alone will NOT solve this problem, since the redistributables only contain the release version of the file MSVCR100.dll (notice no 'D')
MSVCR100D is part of the 2010 Visual Studio package - indicating that some components of your system are compiled with the older version of Visual Studio, so you will need to install the Visual Studio 2010 version - you can probably still develop with the 2012 version, just as long as [parts of] the 2010 is on the machine.
Or you need to recompile some components that your application depends on to use the 2012 (msvcr110d) libraries - if you have all the source code, that would be my preferrred method.
I tried renaming a c++ project in Visual Studio and I'm now getting the following errors:
An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in
mscorlib.dll
Additional information: Could not find any resources appropriate for
the specified culture or the neutral culture. Make sure
"OuiDesktop.PreForm.resources" was correctly embedded or linked into
assembly "OuiProject" at compile time, or that all the satellite
assemblies required are loadable and fully signed.
I get this for every each form that uses a resource. If I comment these lines of code out that raise this error, the program launches okay, but I need the resources.
What have i done wrong? Seems renaming a project in Visual Studio is a nightmare!!
These .resources files are being created in the build directory just fine, just not being included in the assembly!
I was using Visual Studio Express 2010 on this machine. Creating a new project and adding the source files back into that in Express didn't work.
I tried this same fix on another machine with full Visual Studio 2010 Professional and it worked perfectly.
I'm using Visual C++ 2008 Express Edition to create a resource only DLL.
The problem I'm facing is that running the application that makes use of the DLL
on another computer besides mine results in LoadLibrary() function failing with error code 14001.
Searching throught the internet it seems to be a dependecy problem of the computer
running the application lacking libraries of the Microsoft Visual C++ 2008 Redistributable Package.
My first step was to install the latest Microsoft Visual C++ 2008 Redistributable Package but that didn't solved the problem.
Also I changed my project setting so the DLL compiles with static CRT linking assuming that
this way I will get rid the dependencies.
These options seem to be the workarounds for other people having the same issue.
Any idea in which direction to look is highly appreciated.
Thanks
==================================================================================
Thanks for your answers.
Both Dependency Walker and the event viewer indicated a side-by-side configuration
problem as I was missing a debug version library of the VC++ Redistributable Package.
I was careless and have compiled my DLL in debug mode, recompiling in release mode solved the problem.
Try to isolate missing library by Dependency Walker:
http://www.dependencywalker.com/
Just run your application on the second computer with this tool, it should tell you what library is missing. Be sure you are installing the right version of Visual C++ 2008 Redistributable Package; there are two of them, for VS 2008 with SP1 and without any SP...
Look in the eventviewer. Good chance there will be an error there from Windows SideBySide explaining which assembly is missing.
Likely it would be a VC CRT runtime which you will have to bundle with your dll.
(the VC redistributable is available here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29)
I had the same issues but with Visual Studio 2013; a debugging set of DLL's which required a manifest. In my case Microsoft.DTfW.DHL.manifest and dbghelp.dll had to be added to the path (I used the exe directory).