Redistributing Visual C++ 2005 Profession (final) MFC and CRT

Hi,

Just to let you know some findings about the problems you may encounter.

To cut it short, there is something wrong with the manifests for CRT 8.0 and MFC 8.0 from the Visual C++ Redist folder. I would advise not to use them, and taking them from the WinSXS folder of Windows XP instead.

I needed to redistribute MFC 8.0 and CRT 8.0 with an application (what an early adopter I am). I did not want to build the .msi deployment package using the provided merge modules because they contain unwanted files ( like managed MFC, managed CRT) which I did not want in my already big package, and also the user should have admin privileges in order to correctly install the shared CRT and MFC side-by-side assembles, which again was not acceptable for me.

So I decided to install the CRT and MFC 8.0 in the same folder as the application, as private assemblies. I followed the instructions from MSDN and put the libraries and manifests there ( I took them from the Redist folder of Visual C++ ) but, to my surprise, I received the same dreaded "application configuration is incorrect" message.

Looking to the event log, I noticed that an error regarding "error on manifest, line 11" was given for the Microsoft.CRT.80.manifest" file, and also for the MFC manifest when the program tried to load the libraries. The XML syntax of the manifest is correct, but in my opinion it seems that it is missing some data about the libraries.

So I took the manifest files from the WinSXS folder of Windows XP SP2 ( I have got the manifests installed from the Visual C++ 2005 install ) and renamed them properly to match the names of the ones from the Redist folder. They DO differ from the Redist-folder manifests. With those manifests, the application runs ok.

Maybe someone knows more about this problem. I think it's kind of a bug...



Answer this question

Redistributing Visual C++ 2005 Profession (final) MFC and CRT

  • EmilyG

    Please take a look at http://msdn2.microsoft.com/en-us/library/ms235624 for more details.

    Also http://blogs.msdn.com/martynl/ and http://blogs.msdn.com/nikolad/archive/2005/03/18/398720.aspx might contain more explanations.

    Thanks,
      Ayman Shoukry
      VC++ Team



  • Piotr Fe

    Hi,

    My application works perfectly now that I have used the Redist-folder manifests to deploy the CRT 8.0 and MFC 8.0 assemblies as private assemblies.

    But your blog tutorial for Beta1 and Beta2 ( this link: http://blogs.msdn.com/nikolad/archive/2005/03/18/398720.aspx ) is kind of misleading now that the final version is out. It advises to use the manifests from WinSxS for deploying private assemblies, which will not work in the final version.


  • tecxx

    Catalin,

    I'm not sure the postings are in the proper order so I'm unsure as to your final resolution.   I have a similar problem where it works fine on my machine (using the redist manifests) BUT I also have the shared assemblies because of the VS 2005 install.   On other machines without the shared assembly it gets the "configuration error" message.

    Kevin

  • Tober

    Hi,

    To deploy MFC or CRT as a private assemblies you have to use content of folders in vc\redist. You should not be trying deploy them to WinSxS. You need to use MSMs to deploy in WinSxS. You should not need to copy manifests from WinSxS folder. If manifests and Dll does not work from vc\redist for you, please provide more details on your setup. Most likely manifest in your application can have Dlls of another build mode in dependencies or some other mistakes which usually signals of incorrectly sent build environment. But to say anything more about this, I have to wait till I get more information about files in application local folder and manifest of your app.

    Thanks,
    Nikola
    VC++

  • Subhashini A.

    Actually, after doing some extensive research on this I realised that the manifest files from the WinSXS directory SHOULD NOT ( or may I say MUST NOT ) be used if we want to install CRT and MFC as private assemblies (you will get a "syntax error" message in the application event log if you try to run the application on a computer that has no shared CRT and MFC 8.0 installed, which is typical ). The good ones are the ones from the Redist folder, but only if we want private assemblies. If we want to install them as shared assemblies in the WinSXS folder, then the merge module provided should be used (it contains the manifests identical to those from the WinSXS folder).

    I first reached the (wrong) conclusion that the Redist manifests are not good because I already had the libraries installed as shared assemblies by Visual Studio 2005. When using the Redist-folder manifests, it would conflict with the shared assemblies ( I did some file renaming in the WinSXS folder to try do disable the shared CRT and MFC assemblies in order for the program to use the private ones, but now I realize I did not disable it fully ).

    So my final point ( I tested it on some clients ) is that the Redist-folder manifest should be used for private assemblies. For shared assemblies, the provided merge module should be used to deploy CRT 8.0 and MFC 8.0


  • Swatim

    Thanks for letting me know. It was right back then. I will take some time to review steps or mark as "don't use in RTM VS2005".

    Nikola
    VC++



  • Redistributing Visual C++ 2005 Profession (final) MFC and CRT