Incorrect application configuration

The application program (dll, exe) embeds the manifest file by default when compiling, to help confirm the version of the runtime library that the program depends on when it runs. The generated manifest file myexe.exe.intermediate.manifest is embedded at the end of the myexe.exe file and can be viewed through a text editor.

When the embedded manifest file is closed during compilation, the manifest file needs to be copied to the application directory before the program runs. Need to generate the manifest file and embed the manifest file in the vs project configuration.

The runtime library that the program depends on is placed in the directory c:\windows\winsxs\.

Application configuration error, you can use the event viewer or sxstrace tool to help locate the problem.

            1. sxstrace trace -logfile:t.etl //Press Enter to stop tracing

            2. sxstrace parse -logfile:t.etl -outfile:o.txt //output a readability diagnostic report

Note that when compiling the debug version, select the runtime library version to set MD, and the embedded manifest file contains the debug and release versions of the runtime library, causing the application to fail to start; it can be solved by deleting the predefined macro _DEBUG and leaving only the release configuration.

Guess you like

Origin blog.csdn.net/beebeeyoung/article/details/107437456