Error: msvcp90.dll is missing on running an application built in visual C++ - visual-c++

I have a project which I am trying to run (in both normal and debug modes) but every time I run it, it throws the error:
The program cannot start because MSVCP90.dll missing from your computer. Try re installing to fix your problem.
After going through lot of posts about the same problem I've tried the following things but nothing seems to work.
Found this .dll file in C:\Program Files\Microsoft Office Servers\15.0\Synchronization Service\Bin\Microsoft.VC90.CRT and copy pasted it in C:\Windows\System32\. Checked that the environmental variable path has system32 in it.
Checked in the project properties and have set the Embed Manifest option under Manifest Tool-> Input and Output as Yes for Debug as well as Release modes
The project I am building depends on 3 other projects (they are in same solution) and have set Embed Manifest as yes for all of them. Another .exe built for same project built on other machine runs perfectly fine on my machine but the one that I build on the same machine does not work.
Thanks in advance for your help.

Your best bet is to install the "official" Microsoft Redistributable on all target PCs that will run your app:
http://www.microsoft.com/en-us/download/details.aspx?id=11895

Related

Install dll on different machine

I’ve built an Internet Explorer Browser Helper Object in Visual Studio and verified if works by building it locally with regasm.
This produced a Release .dll file which I tried to build on a different computer with no luck.
Is there an easier way to package all of this or am I missing an important step?
I suggest you refer steps below.
Compile your extension in Release mode On the target machine run
regsvr32.exe /s extension.dll under the administrator privileges
Reference:
What is the simpliest way to install a BHO

error cannot open file 'kernel32.lib'

I have installed VS2013 and VS2015 on Windows 7.
I have an existing C++ Dll project that was building fine but now all of a sudden it wont build using VS2015 and gives me the error:
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
From this post: fatal error LNK1104: cannot open file 'kernel32.lib' I went looking for the kernel32.lib file and it is located here:
C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86
When I go to my Projects Properties-->Linker-->Input and select Macros I see that this path is indeed there:
My Platform Toolset is set to Visual Studio 2013 - Windows XP (v120_xp) which is what it always has been set to.
Why has my Project all of a sudden stopped building? What could have gone wrong?
I had this similar problem today with Visual Studio 2013 when I changed my VC++ Directories:
Project->Properties->VC++ Directories:
Include Directories
If the cause is some plug-in/extension that changes your props files, it may in consequence change the "Visual C++ Directories" settings of your project.
So, the solution that worked for me is described on my own answer Can't compile 64 bits Visual Studio 2010 projects, which I fully transcribe to here:
After I asked a colleague for help, we noticed, that even getting
clean builds of the projects from TFS, with overwrite option, the
Project's Configuration Properties > VC++ Directories on my computer
were always different from other computers.
Searching more we found the solution on the last post of Reset
include/lib path, which I will fully transcribe:
use "del %HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"
is not always the right way.
Better use "del %USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"
where the application data folder is normally placed in.
Then I've looked inside the contents of Microsoft.Cpp.x64.user.props
and I've seen that there were things added by Visual Leaks Detector.
Which is reasonable, as one month before, I did a memory leak analysis
using VLD.
So, I deleted the file and now everything compiles fine at 64bits!
I had to install the Visual C++ for Desktop Development.
Open Visual Studio Installer and go to Installed tab. Click on the Change Button on your installed Visual Studio Community Edition. -> On the Workloads Tab there should be a option Desktop Development with C++. Activate that option and modify the changes.
Afterwards it was working for me.
I had the same problem today. As it turned out somehow the SDK 10.0.15063.0 got installed on my system but without the Desktop C++ files. Selecting the SDK in the list of installed programs, doing a change install and there selecting the Desktop C++ options added the necessary files and now I can link again.
I got this error fatal error lnk1104: cannot open file 'kernel32.lib'.
this error is getting because there is no path in VC++ directories.
To solve this probelem
open visual studio 2008
go to Tools-options-Projects and Solutions-VC++ directories-*
then at right corner select Library files
here you need to add path of kernel132.lib
In my case It is C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
Thank you.
I had this following upgrade of some projects from VS2013 to VS2017.
Original project had a manual modification to the "Library Directories" item under VC++ Directories in the project settings.
This meant it did not pick up changes from the upgrade.
Using the option will reset this to something that works (assuming the SDK is installed OK) provided anything other than the default is not needed of course. In my case it was trying to point at the v7.1 SDK but that was not installed for vs2017.
in vs 2019, just run the installer, click modify, and then in the individual components tab, remove windows 10 SDK. then again run the installer and add windows 10 sdk!
I had this similar problem today with Visual Studio 2017. My cause turned out to be a bad environment setting in NETFXSDKDir, specifically:
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1
It needed to have a value of:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x86
I have a more detailed response here:
fatal error LNK1104: cannot open file 'kernel32.lib'
In VS 2022 I was trying to compile an old solution that originally ran in VS 2010 then in VS 2019. It continually gave me the "cannot find Kernel32.lib" error. I spent 8 hours trying everything, including everything on this page. What worked for me: Configuration Properties -> VC++ Directories -> Library Directories and "inherit from parent" (guessing this sets to defaults) fixed this for me. Also note: I'm using winsock and directinput.

DNN Errors 7.02.02

I have just download the DNN package no source and source version too opened it in visual studio 2012 in building it is showing these errors.
I unblock the zip folder before extracting. It works fine when I configure it through netmgr.exe option IIS. I want to do that from visual studio. P.S I am using windows 8.1
Error 1 Could not load file or assembly 'DotNetNuke.Web.DDRMenu' or one of its dependencies. The system cannot find the file specified. C:\Users\Umair\Downloads\DNN_Platform_07.02.02_Install\admin\ControlPanel\RibbonBar.ascx 8
Error 2 The file '/DNN_Platform_07.02.02_Install/DesktopModules/DDRMenu/Menu.ascx' does not exist. C:\Users\Umair\Downloads\DNN_Platform_07.02.02_Install\admin\ControlPanel\RibbonBar.ascx 9
Error 3 Unknown server tag 'dnn:MENU'. C:\Users\Umair\Downloads\DNN_Platform_07.02.02_Install\admin\ControlPanel\RibbonBar.ascx 13
I don't think you're supposed to even try to compile the website they distribute. It should come with everything already compiled for you. Disable building for the website project from the build options dialog to get rid of spurious errors if you have other projects you'd like to compile in the same solution.
I'm not all too surprised there's a few errors in there (It's DNN, what did you expect?)

Windows Store Apps: Visual Studio 2012 The system cannot find the path specified error?

I downloaded a sample Windows Store Apps project from the Dev Center samples site
When I run the project, I receive the following error in the CharmDemoGridApp
The system cannot find the path specified error
there are no more details, I tried to clean and rebuild the project and nothing happens.
what can be the reason of this ?
OK, I found that the reason was a missing referenced dll.
adding it correctly solved the problem

How to install MSVCR90D.DLL

How do I install MSVCR90D.DLL? I have a small test DLL(debug mode) that I created a setup project. In my setup project, I included merge modules & policy for vc90_debugcrt_x86.msm, etc. When I install the DLL on my VM, dependency walker still reports that MSVCR90D.DLL cannot be found?
Thanks in advance.
See here.
Preparing a Test Machine To Run a
Debug Executable
Microsoft does not officially support deploying debug runtimes outside of dev/test environments but you can make it work if you need to. Sounds like this is a vanilla test environment installation, though.
Just copy the MSVCR90D.DLL file into the same directory as your own dll. Then both your dll and dependency walker will find the MSVCR90D.DLL file.
You may need a couple of other files like msvcp90d.dll or msvcm90d.dll but dependency walker knows if you need them for your purposes.
MSVCR90D.DLL is the debug version of the Visual Studio Runtime Libraries. Normally, if you're deploying that code, you would build it in Release mode and also provide/install the Visual Studio Runtime Redistributable. As far as I know, the only way to obtain the debug dlls are through a Visual Studio install.
The py2exe utility that converts Python scripts into executable Windows programs seems to have a similar problem here. Maybe the section "Bundling the C runtime DLL" helps you to find the solution.

Resources