Ask a questionAsk a question
 

AnswerMSBuild Error MSB3141

  • Friday, October 16, 2009 12:45 AMGuitarMan911 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am using Visual Studio 2008 Professional and Crystal Reports 2008 on Windows XP Professional SP3 and developing a WinForms application.  When I build my deployment project, I receive the following error:

    MSB3141: No 'PublicKey' or 'Hash' attribute specified for file 'vcredist_x86_8.0\vcredist_x86.exe' in item 'Visual Studio 2005 SP1 C++ Runtime Libraries (x86)'.

    The help says to: "Download the package file for which the information is missing and copy it into the bootstrapper cache."

    I was told by Crystal Reports support that, when deploying Crystal Reports 2008 with a VS2008 app, I needed to include the the Visual Studio 2005 SP1 C++ Runtime Libraries as a prerequisite.

    Can someone tell me what the package file is, where I can download it from, and how to copy it into the bootstrapper cache?


    TIA,
    Jack

    • Moved byKira QianMSFTFriday, October 16, 2009 6:58 AM (From:ClickOnce and Setup & Deployment Projects)
    •  

Answers

  • Friday, October 16, 2009 9:52 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Jack,

    Thanks for your post.

    As the error message shows, it occurs because the MSBuild engine cannot find the prerequisite for Visual Studio 2005 SP1 C++ Runtime Libraries(vcredist_x86.exe). By default, MSBuild trys to get the bootstrapper packages from %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\. The path is actually defined in the following registry key. Please check this thread for detailed discussion.

         HKLM\Software\Microsoft\GenericBootstrapper\3.5

    As for your question, you can try to copy the prerequisite for Visual Studio 2005 SP1 C++ Runtime Libraries from a box with Visual Studio 2005 SP1 installed(%ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\) to the bootstrapper cache and rename the folder as "'vcredist_x86_8.0".

    Thanks,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg[at]microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Wednesday, October 21, 2009 3:34 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Jack,

    Thanks for your feedback.

    Please also check the prerequisites with Visual Studio 2008, open the Property page of the project, select Publish tab and click Prerequisites button, make sure that the prerequisite for Visual Studio 2005 SP1 C++ Runtime Libraries is included in the list.

    If it is convenient for you, could you please send me the project file as well as the package and product schema for the Visual Studio 2005 SP1 C++ Runtime Libraries (in %ProgramFiels%\Microsoft SDKs\Windows\V6.0a\Bootstrapper\vcredist_x86_8.0) to my mailbox(v-rzhang[at]microsoft.com)?

    Thanks,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked As Answer byGuitarMan911 Monday, November 02, 2009 10:52 PM
    •  

All Replies

  • Friday, October 16, 2009 9:52 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Jack,

    Thanks for your post.

    As the error message shows, it occurs because the MSBuild engine cannot find the prerequisite for Visual Studio 2005 SP1 C++ Runtime Libraries(vcredist_x86.exe). By default, MSBuild trys to get the bootstrapper packages from %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\. The path is actually defined in the following registry key. Please check this thread for detailed discussion.

         HKLM\Software\Microsoft\GenericBootstrapper\3.5

    As for your question, you can try to copy the prerequisite for Visual Studio 2005 SP1 C++ Runtime Libraries from a box with Visual Studio 2005 SP1 installed(%ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\) to the bootstrapper cache and rename the folder as "'vcredist_x86_8.0".

    Thanks,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg[at]microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Monday, October 19, 2009 8:13 PMGuitarMan911 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks for your reply Rong-Chun,

    I already have Visual Studio 2005 SP1 installed on the same box where I am receiving the error.  The  following folder already exists:

    %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\vcredist_x86_8.0.

    I am assuming that you were suggesting I copy

         %ProgramFiles%\Microsoft Visual Studio 8\SDK\2.0\Bootstrapper\Packages\vcredist_x86
    to
         %ProgramFiels%\Microsoft SDKs\Windows\V6.0a\Bootstrapper\vcredist_x86_8.0

    If so that was already done.  If not, please explain more clearly what you were suggesting.


    Thanks,
    Jack

  • Tuesday, October 20, 2009 3:03 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello Jack,

    >I am assuming that you were suggesting I copy
    >     %ProgramFiles%\Microsoft Visual Studio 8\SDK\2.0\Bootstrapper\Packages\vcredist_x86
    > to
    >     %ProgramFiels%\Microsoft SDKs\Windows\V6.0a\Bootstrapper\vcredist_x86_8.0

    You are right, that's my suggestion. Since it doesn't work, please check the ToolsVersion Attribute is set to 3.5. MSBuild will use this attribute to determine where to load tools.

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
       ......
    </Project>

    More info
    http://msdn.microsoft.com/en-us/library/bb397428.aspx

    Another thing that is worth a try is that we can rename the %ProgramFiles%\Microsoft Visual Studio 8\SDK\2.0\Bootstrapper\Packages\vcredist_x86 folder to vcredist_x86_8.0 to see if the problem continues.

    Thanks
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Tuesday, October 20, 2009 9:47 PMGuitarMan911 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello Rong-Chun,

    I added the <Project> tag as you suggested above, but it made no difference.  I also followed the links in your posts and verified that all of the settings are as listed.  I still can't get a successful build.

    I originally built the application for .NET Framework 2.0, but have also tried 3.5.  I still cannot build.

    I have a completed application that is impossible to deploy.  Do you have any other suggestions?


    Thank you,
    Jack

  • Wednesday, October 21, 2009 3:34 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hello Jack,

    Thanks for your feedback.

    Please also check the prerequisites with Visual Studio 2008, open the Property page of the project, select Publish tab and click Prerequisites button, make sure that the prerequisite for Visual Studio 2005 SP1 C++ Runtime Libraries is included in the list.

    If it is convenient for you, could you please send me the project file as well as the package and product schema for the Visual Studio 2005 SP1 C++ Runtime Libraries (in %ProgramFiels%\Microsoft SDKs\Windows\V6.0a\Bootstrapper\vcredist_x86_8.0) to my mailbox(v-rzhang[at]microsoft.com)?

    Thanks,
    Rong-Chun Zhang
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked As Answer byGuitarMan911 Monday, November 02, 2009 10:52 PM
    •  
  • Monday, November 02, 2009 10:57 PMGuitarMan911 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    With some additional configuration I was able to get it to work.  I put the vcredist_x86.exe file in the %ProgramFiels%\Microsoft SDKs\Windows\V6.0a\Bootstrapper\vcredist_x86_8.0, and that is what allowed it to finally work.

    Thank you for all your assistance.


    Jack