Friday, March 18, 2005 10:46 AM
NikolaD
Resolving your dependencies on VC++ libraries in VS2005 Beta 1
This article does not apply to final release of VS2005. Steps outlined below were only required in VS2005 Beta2. For an example that demonstrates recommended steps in final release of VS2005 please see http://msdn2.microsoft.com/en-us/library/ms235285.aspx
Another FAQ. As you may already know from VS2005 Beta 1 or CTPs, Visual C++ 2005 supports a new deployment model for Windows-client applications using isolated applications and side-by-side assemblies. The ATL, MFC, and CRT libraries are now side-by-side assemblies that are installed in WinSxS folder and can be shared at runtime by isolated applications. Building your C/C++ program as an isolated application and developing your assemblies as shared side-by-side assemblies has number of advantages. Such isolated applications are not unaffected by changes to the registry, other applications installing same DLLs or other versions of assemblies running on the system. The sharing of side-by-side assemblies after deployment on either a global or per-application basis can be easily controlled by application's authors or system administrators. This also simplifies servicing of already deploy applications and provides a way to avoid DLL versioning conflicts caused by an incompatible versions of DLLs installed on the same client machine. If you are not familiar with isolated applications and side-by-side assemblies deployment model a good point to start is to read
About Isolated Applications and Side-by-side Assemblies
However, let's go back to questions I am often asked. How to redistribute VC++ libs in applocal? In Beta 1 and Beta 2 the answer is:
- Go to Windows\WinSxS and find assembly and Dlls you are interested in. For example, let's assume you are interested in the CRT and STL DLLs on x86. Then you are looking for directory x86_Microsoft.VC80.CRT_[staff]_8.0.50110.4359_[staff] with msvcr80.dll and msvcp80.dll. This 8.0.50110.4359 is the assembly version, remember it for future. Check that version of the compiler you are using matches to version of this assembly.
- Copy these two Dlls to your application local folder.
- Go to Windows\WinSxS\Manifests\ and find 636 x86_Microsoft.VC80.CRT_[staff]_8.0.50110.4359_[staff].manifest.
- Copy this manifest to application local folder.
- Rename this manifest to Microsoft.VC80.CRT.manifest. Basically name of the manifest has to match name of the assembly (it can be find on the 4th line of the manifest if you view it).
- Copy your app and Dlls and manifest to another computer where VS2005 is not installed. Try to run it and it should run.
We are considering make it simpler on RTM and have several solutions in mind. Will see what comes up from discussions.
Hope this works for you and makes world of IA and SbySA somewhat clearer.