Solution for MSVCP140.dll missing

Solution for MSVCP140.dll missing

Prospect summary : In a previous project, there was a function of using workhtml to generate a pdf from a page corresponding to a URL. The functions of the development and testing environment were all normal, but after deploying to the customer’s official environment server, the function failed and the system did not give Give a detailed error report. Later, when using workhtme.exe using a console application, I found that the client environment prompted "Cannot start the program because MSVCP140.dll is missing from the computer. Try to reinstall the program to solve this problem." As shown below:

Insert picture description here
After referring to the experience of the predecessors on the Internet, the solution was finally solved. The specific solution steps are as follows.

  • **Copy msvcp140.dll from the C:/C:\Windows\System32 and C:\Windows\SysWOW64 folders in the correct server environment, and copy it to the server where the dll is missing according to the corresponding directory. **As shown:
    Insert picture description here

  • Register dll
    Win+R and enter cmd to open the command prompt and execute the following instructions

  • cd C:\Windows\System32

  • Regsvr32 msvcp140.dll is shown in the
    figure:
    Insert picture description here
    When it gets there, it will prompt the following error:
    Insert picture description here
    This problem can be ignored. After executing the above command, our program can already be run.

Postscript:
1. In the web project that I released, when I performed breakpoint debugging or operation log recording, the server was missing dll, and no error was thrown. It was found that the dll was missing because I used the console application test. As for why there is no error message in my project, I can’t explain.
2. The dll registered in the command prompt reported "error that the specified module could not be found", but the program can run normally. I can't explain this phenomenon at present. (Officially because of this phenomenon, when I went to the customer site to solve the problem for the first time, I always thought that I could not register successfully, and finally returned in anguish, when I found that the problem was actually solved for the first time.)

Guess you like

Origin blog.csdn.net/qq_39541254/article/details/106047083
Recommended