none
Setup program cannot handle newer redistributable

    Question

  • I'm distributing an Excel add-in to customers. I'm using a standard Visual Studio 2010 setup project for deployment (not clickOnce). Suddenly the setup program doesn't work on a computer (Win7 64bit) where it used to work.

    Symptom: Message-box with following message:
    Please resolve the following: A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on this machine."
    Continue-button is disabled, can only Close the message-box which cancels the install.

    Observation 1: Control Panel\All Control Panel Items\Programs and Features shows that the following has recently been installed:
    Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219

    Observation 2: The install works fine on a different computer (Win7 64bit) where the same redistributible has version 10.0.30319.

    Conclusion: The setup program cannot install if the target has a newer redistributable.

    Question 1: Assuming that redistributables are backwards compatible, how do I make the setup program accept newer restributables?

    Question 2, assuming that the answer to question 1 is negative: How do I upgrade the setup program to the newer redistributable?
    jeudi 16 février 2012 08:27

Toutes les réponses

  • Then you will need to check the version number of the vcredist_x86, make this as a registryCheck, then check the number.

    You can reference this proceed in the "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX40Client\Product.xml" file.

    Add this check function in the vcredist_x86\Product.xml to implement your request.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    vendredi 17 février 2012 05:05
    Modérateur
  • Thank you for reminding me that the relevant filename is vcredist_x86.exe

    Unfortunately, I don't understand your answer:
    * Is it an answer to question 1 or 2?
    * How do I check the version number of vcredist_x86 as a registry check?
    * What is the relevance of DotNetFX40Client\Product.xml? How do I reference in it?
    * How precisely do I add a check (which check?) in vcredist_x86\Product.xml?

    To clarify the situation at my end:
    * In the prerequisites for the setup program I have checked "Visual C++ 2010 Runtime Libraries (x86)" since it is necessary for the program I want to install.
    * I have also selected numerous other necessary prerequisites.
    * I have selected "Download prerequisites from the component vendor's web site"
    * The computer (Win7 64bit) I use for building the install has the following installed itself: "Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219".
    * Running the install on the same computer where it was built gives the above-mentioned error-message.
    * I understand from the error message that the installer is trying and failing to install vcredist_x86 version 10.0.30319 on this computer since it already has version 10.0.40219 installed.
    * I wouldn't like my customers to face the same problem since it would prevent them from installing my product.
    * I suggest to solve this problem by either (1) making the installer accept newer versions or (2) upgrade the installer to the (currently) newest version - but maybe there are other options?
    * I don't know how adding a prerequisite to the setup program makes it require a specific version of this prerequisite.

    Sorry to bother you with further questions but I need this problem to be solved.
    vendredi 17 février 2012 20:18
  • OK, just forget what I said in the frist post, the easiest way is downloading the 10.0.40219 and replace your vcredist_x86.exe.

    It seems that you're not using Visual Studio 2010, Windows SDK 7 has the 10.0.40219 vcredist_x86 bootstrapper.

    This way can let it work well for you.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    lundi 20 février 2012 08:59
    Modérateur
  • I am indeed using Visual Studio 2010 and I have installed VS 2010 SP1 which seems to include vcredist_x86.exe version 10.0.40219.

    The problem is that the installer I built with my standard Visual Studio Installer is trying to install vcredist_x86.exe of a previous version even though the (same) machine, on which the install was built, has version 10.0.40291 installed. I've specified that the installer should download prerequisites from the component vendor's web site in order to keep the installer small since it is distributed via the internet.

    Why does the installer insist to install a previous version of vcredist_x86 as compared to the version on the machine where the installer was built?

    mardi 21 février 2012 19:22
  • Do you mean the URL it uses is also a pre version vcredist_x86?

    We can check if the correct version prerequisites component in the folders(Setup1\Debug\vcredist_x86). You can right click on the vcredist_x86.exe file, and view the properties->detail tab. Then let me know if that file version is not the newer one.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    mercredi 22 février 2012 09:15
    Modérateur
  • I'm building the Setup project in Release configuration only so  the \Debug folder is empty.
    The \release folder has the following contents:
        \Readme.htm        (because I put it there)
        \setup.exe
        \[MyApp].msi
    - probably because I selected the 'Download prerequisites from the component vendor's web site'-option.
    mercredi 22 février 2012 19:28
  • Ok, now I know your problem.

    It is because of the home site url form downloading in package.xml for the vcredist_x86 is a pre version file.

    So we can use the newest version file download url to replace it.

    Edit "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86\en\package.xml"

    <string name="VCRedistExe">http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x409</string>
    to
    <string name="VCRedistExe">http://www.microsoft.com/download/en/confirmation.aspx?id=8328</string>

    And I have submit this problem to MS Connect: https://connect.microsoft.com/VisualStudio/feedback/details/726264/msdn-forum-vcredist-x86-bootstrapper-package-xml-content-wrong

    If there's any concern, please feel free to let me know.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us


    jeudi 23 février 2012 06:27
    Modérateur
  • Now I've done the following:

    > Applied the change you suggest to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86\en\package.xml

    > Recompiled the Setup program

    If I now try to run the setup.exe I get the following error-message:

    > "Setup has detected that the file 'C:\Users\Bruger\AppData\Local\Temp\VSDE5C2.tmp\vcredist_x86\vcredist_x86.exe' has changed since it was initially published."

    Looking into the install.log-file gives some more info:

    --- from install.log: -----------------------------------------------------------------
    Result of checks for command 'vcredist_x86\vcredist_x86.exe' is 'Install'
    'Visual C++ 2010 Runtime Libraries (x86)' RunCheck result: Install Needed
    Verifying file integrity of C:\Users\Bruger\AppData\Local\Temp\VSDE5C2.tmp\vcredist_x86\vcredist_x86.exe
    WinVerifyTrust returned -2146762749
    Subject form unknown
    Error: Setup has detected that the file 'C:\Users\Bruger\AppData\Local\Temp\VSDE5C2.tmp\vcredist_x86\vcredist_x86.exe' has changed since it was initially published.
    --------------------------------------------------------------------

    Looking into the detailed properties of the mentioned vcredist_x86.exe shows no version info - neither file version, product name or product version.

    Looking into 'Control Panel > Programs and Features' shows that 'Microsoft Visual Studio 2010 Service Pack 1' is installed. I try to reinstall it:

    > Downloading from http://www.microsoft.com/download/en/confirmation.aspx?id=23691
    > Running VS10sp1-KB983509.exe
    > Selecting Reapply Microsoft Visual Studio 2010 Service Pack 1
    - gives the following message:

    --- Microsoft Silverlight 4 SDK ---------------------------------------------------------
    The feature you are trying to use is on a network resource that is unavailable.
    Click OK to try again, or enter an alternate path to a folder containing the installation package 'silverlight_sdk-msi' in the box below.
    Use source: C:\Users\Bruger\AppData\Local\Temp\Microsoft Visual Studio 2010 Service Pack 1_10.0.40219\Silverlight4\1033\
    -----------------------------------------------------------------------------------------

    The above 'Use source'-path contains silverlight_sdk.cab. I have no problem going on the internet.

    If I try to reapply from 'Control Panel > Programs and Features' I get the same behaviour.
    If I try to remove Microsoft Visual Studio 2010 Service Pack 1 I get the following message:

    --- Warnings: ----------------------------------------------------------------------------
    The removal of Microsoft Visual Studio 2010 Service Pack 1 may put this computer in an state in which projects cannot be loaded and Service Pack 1 cannot be reinstalled. For instructions about how to correct the problem, see the readme on the Microsoft Download Center website.
    -----------------------------------------------------------------------------------------

    This sounds alarming and the Microsoft Download Center website gives no help.

    So I try another similar machine (Win7 64-bit, VS2010 incl. SP1). Same behaviour.

    What to do?

     

     

    jeudi 23 février 2012 21:45
  • Maybe it is the internet downloading process interrupted, which makes the file downloaded is not completed.

    [TRUST_E_SUBJECT_FORM_UNKNOWN - The form specified for the subject is not one supported or known by the specified trust provider This can happen when WinVerifyTrust is called on an unknown file type CERT_E_REVOKED - A certificate was explicitly revoked by its issuer. CERT_E_EXPIRED - A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file TRUST_E_BAD_DIGEST - The digital signature of the object did not verify This will happen if the file has been modified or corruped.]


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    mardi 28 février 2012 08:17
    Modérateur
  • I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?

    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    jeudi 1 mars 2012 06:20
    Modérateur
  • I have no problem downloading from the internet so there must be another reason. The problem seems to relate to the PC on which the install is built. I tried to build and install a dummy C++ program on the build machine - PC1 - and another similar machine - PC2:

    > Create a dummy C++ project in a new solution
    > Add a Visual Studio Installer project 'Setup1'
    > In Setup1 project: add primary output from dummy C++ project
    > In Setup1 project properties->prerequisites: Check Visual C++ 2010 Runtime Libraries (x86)
        (keep default: Download prerequisites from the component vendor's web site)
    > Build project (in release configuration)

    PC1 (Win7 64bit VS 2010 SP1) has - after your suggested change - the following url in "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\vcredist_x86\en\package.xml":
    <string name="VCRedistExe">http://www.microsoft.com/download/en/confirmation.aspx?id=8328</string>

    PC2 (Win7 64bit VS 2010 SP1) has url
    <String Name="VCRedistExe">http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x409</String>

    If I build & install @ PC1 the following happens:
    > First dialog: "The following components will be installed on your machine: Visual C++ 2010 Runtime Libraries (x86) - do you wish etc." Install/Cancel,
    > Install -> Downloading file 1 of 1 -> => Setup has detected that the file 'C:\Users\sborum\AppData\Local\Temp\VSDB48F.tmp\vcredist_x86\vcredist_x86.exe' has changed since it was initially published

    If I build @ PC1, install @ PC2 the same failure happens

    If I build & install @ PC2 the following happens:
    > Install goes straight to dialog "Welcome to the Setup1 Setup Wizard" and installs successfully

    If I don't check prerequisite Visual C++ 2010 Runtime Libraries (x86), build & install @ PC1:
    > Install goes straight to dialog "Welcome to the Setup1 Setup Wizard" and installs successfully

    If I on PC1 change the url back to match PC2 and build & install @ PC1 the following happens (this is the original behaviour reported in this thread more than two weeks ago):
    > First dialog: "The following components will be installed on your machine: Visual C++ 2010 Runtime Libraries (x86) - do you wish etc." Install/Cancel,
    > Install -> Downloading file 1 of 1 -> => Setup has detected that this computer does not meet the requirements to install this software. The following blocking issues must be resolved before you can install Microsoft Visual Studio C++ 2010 x86 Redistributable Setup software package. Please resolve the following:
    A newer version of Microsoft Visual C++ Redistributable has been detected on the machine.

    If I build @ PC2 and install @ PC1 with url <String Name="VCRedistExe">http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x409</String> the following happens:
    > Install goes straight to dialog "Welcome to the Setup1 Setup Wizard" and installs successfully

    A preliminary conclusion:
    > Changing the url has had no positive effect.
    > The problem seems to relate to the build machine
    > Unfortunately, changing build machine for my project is not an option

    Does Visual Studio Installer handle the scenario where a newer version of Microsoft Visual C++ 2010 x86 Redistributable is present on the customer's PC?


    • Modifié sborum vendredi 2 mars 2012 14:41
    jeudi 1 mars 2012 21:42
  • If I build the Excel add-in (not the dummy C++) at PC2 and install at PC1 I still get the same errormessage as reported in the first mail of this thread. So back to square one, this can also happen when my customers try to install.
    lundi 5 mars 2012 22:44
  • ['C:\Users\sborum\AppData\Local\Temp\VSDB48F.tmp\vcredist_x86\vcredist_x86.exe' has changed since it was initially published]

    Maybe you can try to check this folder before you trying to install after built your Setup project.

    delete the vcredist_x86 directory, or clean the whole VSDB48F.tmp directory.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    mercredi 7 mars 2012 10:34
    Modérateur
  • The same problem exists in my case:

    I am using Visual Studio 2010 SP1. My executable also needs the Visual C++ 2010 Runtime Libraries (x86),  and i have choosen the 'Download from vendor' option in the setup project.

    Trying to install on the customer's machine, the setup wants to install the C++ runtime. It downloads an old version (10.0.30319), which cannot be installed as the customer's machine already has the newer version 10.0.40219 installed.

    For me there are at least two open questions:

    • Why does the setup request the old version of the runtime, althoug i'm using SP1 of Visual Studio?
    • Why does the setup not accept  a newer version of the runtime installed at the customer mashine?
      This point is the worst: Even if we manage to solve point one and get an up to date setup now, it will fail as soon as a newer version of the runtime is published and installed.

    What can i do to help to solve this urgent problem?

    jeudi 8 mars 2012 08:06
  • Deleting the temporary vcredist_x86-folder didn't have any effect.

    The problem is easily reproduced (<2 minutes) by creating a dummy C++ solution as described above. The setup.exe gets product version 10.0.30319.1 which is the same as the vcredist_86 it is trying to install. Maybe a hint to the reason for this problem?

    Got numerous hits when searching the net for "A newer version of Microsoft Visual C++ Redistributable has been detected on the machine". The general recommendation is to uninstall the newer version, however, this is an inadequate solution since it may harm other applications on the customer's computer.

    Until now there has been no progress in this thread. The commercial release of my product has been delayed for a month by this issue. This is an intolerable situation. Any suggestions for how to move forward towards a solution would be most welcome.
    samedi 10 mars 2012 04:58
  • I'm afraid that maybe you would need to upgrade your application to the newest version vc_redist_86, or recommend your users to downgrade its vc_redist_86.

    I think you can see I also submitted your issue to the MS Connect web site, I really want to help you, but I also only got this response, maybe they have not got a perfect solution to answer this:[Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.https://connect.microsoft.com/VisualStudio/feedback/details/726264/msdn-forum-vcredist-x86-bootstrapper-package-xml-content-wrong And if you think the MS Connect case need more information to describe, or something I described not meet your scenario very well, then please try to post your information to that case, I think, then the related engineers will collect more valuable information to work with this question.

    And if you also found any other persons asked the same question, then please also post the links to that MS Connect case.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    mardi 13 mars 2012 08:40
    Modérateur
  • I'm afraid that maybe you would need to upgrade your application to the newest version vc_redist_86, or recommend your users to downgrade its vc_redist_86.

    Hi Mike,

    You've helped me on the MSDN Forums in the past, and I appreciate your assistance, but our applications are using the latest version of the Visual C++ Runtime. I recommend that Microsoft fixes the Bootstrapper packages.

    If you look at my feedback on the Connect issue (which is now closed as "Won't Fix" you'll see I call out a few things:

    1. The instructions are wrong (wrong paths)
    2. The instructions omit the need to update the package.xml file further (that is, the MsiProductCheck needs to be updated)

    Just to be completely clear:

    1. Our applications have a dependency on the VC++ 2010 SP1 runtime
    2. The bootstrapper packages are for the VC++ 2010 RTM runtime, even after SP1 is applied
    3. The SP1 readme has the wrong instructions
    4. The SP1 readme has incomplete instructions

    For the moment I'm going to try and statically link in the VC++ runtime with my application, although that seems a bit fragile.

    While we're at it, "http://www.microsoft.com/download/en/confirmation.aspx?id=8328" terminates at a webpage, not a .exe, so it should be clear why this doesn't download the runtime. The Connect article has the correct URLs.


    mardi 10 avril 2012 00:21
  • It seems that you have you way to let the work go on, then I'm glad to hear that.

    But the url "http://www.microsoft.com/download/en/confirmation.aspx?id=8328" works when I access it, it popup me the download file dialog, and let me save the exe file.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    mardi 10 avril 2012 08:05
    Modérateur
  • Hi Mike,

    That's fine for a web browser, it can parse HTML. See below, I've excerpted the bit of magic that makes a web browser download the Visual C++ Runtime:

    <meta http-equiv="refresh" content="0;url=http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe" />

    But I believe what's really needed is a direct link to the executable, which is what the Connect article and the SP1 readme describes (correctly, although there is other information that is incorrect or incomplete). The installer doesn't understand what to do with the HTML file "http://www.microsoft.com/download/en/confirmation.aspx?id=8328" describes.

    Is there any chance we can get the Connect issue re-opened, I'll think you'll agree that 1) the paths are wrong and 2) the package detection is incorrect?
    • Modifié ta.speot.is mercredi 11 avril 2012 02:33
    • Proposé comme réponse Quoc.Nguyen mercredi 28 novembre 2012 04:43
    mercredi 11 avril 2012 02:32
  • I have no idea to make it re-open.

    But I think you can submit a new report and describe those two things, this is the only option I can think out.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    mercredi 11 avril 2012 08:55
    Modérateur
  • Hi ta.speot.is,

    I used 

    <String Name="VCRedistExe">http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe</String>

    instead of 

    <string name="VCRedistExe">http://www.microsoft.com/download/en/confirmation.aspx?id=8328</string>

    Mike's link will be download HTML file as vcredist_x86.exe by Pre-reqs.

    Hope it helps.


    mercredi 28 novembre 2012 04:50
  • Hi,

    I got the same problem and follow your suggestion but still getting the problem Visual C++ 2010 Runtime Libraries prerequisite keeps popping up on a VS 2010 created installer. i go throuth the following link but the solution not working.

    http://stackoverflow.com/questions/7785328/visual-c-2010-runtime-libraries-prerequisite-keeps-popping-up-on-a-vs-2010-cre


    Manish Maheshwari Blog : http://manish2278.blogspot.in/

    mercredi 8 mai 2013 09:37
  • I went with static linking. If you really do need to dynamically link and therefore have a dependency on the VC++ Redistributable, you might want to look at WiX and its ability to install the redistribute for you.
    • Modifié ta.speot.is mercredi 8 mai 2013 10:39 Stray word
    mercredi 8 mai 2013 10:38