Wednesday, October 28, 2009

Assembly Manifest - Application failed to start because MSVCPXXX.dll not found

Assembly Manifest in dotnet framework application.

    Each application developed using dotnet framework can have manifest file. The assembly either static or dynamic have manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information.

ref: http://msdn.microsoft.com/en-us/library/1w45z383%28VS.71%29.aspx

Application failed to start because MSVCP60D.dll not found.

    Because of manifest contains the assembly version, security requirements etc. If you run the executable file (Exe) without the manifest file for example if you have Application.exe then the same build folder has Application.exe.manifest. If you run the application without Manifest file It shows the error that Application failed to start because MSVCPXXX.dll not found Reinstalling the application may fix the error.


To avoid this error run the application with manifest file or Make the Executable and manifest as a single file.
To make this

goto command prompt change directory to visual studio directory (Ex : C:\Program Files\Microsoft Visual Studio 9.0\VC directory). The VC directory in visual studio has vcvars32.bat run that bat file. then change directory to application path directory


For executable
mt.exe –manifest MyApplication.exe.manifest -outputresource:MyApplication.exe;1

For static or dynamic Library
mt.exe –manifest MyLibrary.dll.manifest -outputresource:MyLibrary.dll;2

(1 for an EXE, 2 for a DLL.)

Now you can use the exe without manifest files..

Fav This With Technorati Add To Del.icio.us Digg This Add To Reddit

0 comments: