Missing C++ Runtime file MSVCR71.dll causes installation and runtime failures
|Date:||30 May 2011|
|Product/Release:||Visual LANSA V12|
|Abstract:||Missing C++ runtime file MSVCR71.dll can cause Deployment Tool installations to fail during the loading of file data, and/or runtime failures that refer to missing application DLLs (which do exist).|
|Submitted By:||LANSA Technical Support|
Several issues that have arisen from missing C++ runtime file MVCR71.dll have been reported by LANSA customers. There are 2 existing tips regarding specific variations:
This technical note aims to provide a central repository for information relating to missing C++ runtime DLLs and their effects on LANSA applications.
On some PCs, a specific Microsoft C++ runtime DLL required by LANSA does not exist. This causes the LANSA runtime to generate an error reporting that the LANSA module/OAM can not be found. This is generated even though the object exists in the partition execute directory. An example of the error message is:
During a deployment tool package installation, it can also cause the load of file data to fail. In this case the message "Version of [File name] cannot be determined" will appear (along with other errors) in the installation log dpinstal.log.
C Definition of File PSLMST has changed, rebuild required (16/03/11) (12:53:58)
C Rebuild of File PSLMST successful (16/03/11) (12:53:58)
C Copy of file pslmst.CTD was successful (16/03/11) (12:53:59)
C Copy of file pslmst.DLL was successful (16/03/11) (12:53:59)
F Load of data for File PSLMST failed (16/03/11) (12:53:59)
"C:\LANSA\X_WIN95\X_LANSA\X_DEM\SOURCE\PSLMST.CTD" - Invalid Path Specifie
[Microsoft][SQL Server Native Client 10.0][SQL Server]The server principal 'LX_DTA' already exists when ex
[Microsoft][SQL Server Native Client 10.0][SQL Server]User, group, or role 'LX_DTA' already exists in the cu
Version of "PSLMST" cannot be determined.
As mentioned above, the root cause of this error is a missing C++ runtime file. In most cases it is the MS Visual Studio .Net 2003 C++ runtime object MSVCR71.DLL (objects created in Visual LANSA version 11 require this runtime DLL for execution). Previously, MSVCR71.DLL was shipped as standard in the System32 directory of Windows, so it was not included in the LANSA deployment package. However it is no longer shipped, and Microsoft have left it up to the user to download/install this themselves.
Objects created in Visual LANSA version 12 use the MS Visual Studio .Net 2008 runtime (MSVCR90.DLL), however the deployment tool now includes an option to ship the 2008 runtime with deployment packages (it is selected by default).
If any of the symptoms above occur on a LANSA runtime environment then there is a chance that the required runtime DLL is missing. If any part of the application was built on Visual LANSA V11 with the standard compiler, then MSVCR71.DLL is required to be on the target PC, in a location in that is accessable by LANSA (i.e. c:\Windows\System32 or any path that is included in the %PATH% environment variable).
The following page provides a summary on which msvcrnn.dll is required for a given Visual Studio version:
One recommended solution is to download or copy the MSVCR71.DLL from a working computer, and place it in the system execute directory (x_win95\x_lansa\execute) of the target PC. This allows LANSA programs to use the DLL without affecting other Windows applications.
For packages deployed using the Deployment Tool, the DLL can be included as a Non-LANSA object in your Deployment Tool Package (target location System Execute directory). However if the file data load error is being encountered during install, then this will not work, as the Non-LANSA Object file copy will occur after the error. In that case it is possible to manually include the DLL in your package and copy it as a before-installation command:
ALL COPY "%pkgd%[Your Application Name]\[Your Package Name]\msvcr71.dll" "%dirl%execute\msvcr71.dll"
Once the package is built, just manually copy the msvcr71.dll in the main package directory (where the setup.exe is)