locked
After installing 2011, VS2010 reports "MSBuild does not contain a value for the "VCTargetsPath" property" RRS feed

  • Question

  • Replication:

    1. Windows 7 Pro x64, C++/C Solution, Multiple sub-projects, No CLR support, VS 2010 Pro with all current updates
    2. Solution located in %SolnDir%
    3. Rebuild all with VS2010 prior to installing 2011
    4. Install 2011, reboot as many times as required (try not to cry a happy/sad tear at rebooting 3 times to install a compiler)
    5. c:\> xcopy /T/E/I/Q/Y %SolnDir% %SolnDir%-2011
    6. Load solution located in %SolnDir%-2011 in VS11 *BETA*
    7. Decline to upgrade solution
    8. Rebuild all with VS11 to confirm builds
    9. Close VS11
    10. Open original copy in%SolnDir% again with VS2010
    11. Output window shows, for each sub-project, error  : MSBuild does not contain a value for the "VCTargetsPath" property.

    Saturday, March 3, 2012 7:23 PM

Answers

  • =( I've actually fixed the problem by running the Visual Studio 2010 Uninstaller and selecting "Repair" on all 3 affected machines.

    All 3 had also had the Developer Preview installed on them, and some users have suggested elsewhere that the removal of the VS21DP was the cause, not the installation of 2011 Beta.

    Thank you for your response, however;

    - Oliver

    Tuesday, March 6, 2012 5:08 AM

All replies

  • Hi quietbrit,
    Please try to check whether you have the following two registry keys.
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
    • Key Name: VCTargetsPath
    • Type: REG_SZ
    • Value: $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
    • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\4.0
    • Key Name: VCTargetsPath
    • Type: REG_SZ
    Value: $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\
    If you missing them, please try to add it to your computer.

    And if this issue remains, please try to directly open VS2010 solution with VS2010 after installed VS11 beta. And tell us what happened.


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us


    Monday, March 5, 2012 5:54 AM
    Moderator
  • =( I've actually fixed the problem by running the Visual Studio 2010 Uninstaller and selecting "Repair" on all 3 affected machines.

    All 3 had also had the Developer Preview installed on them, and some users have suggested elsewhere that the removal of the VS21DP was the cause, not the installation of 2011 Beta.

    Thank you for your response, however;

    - Oliver

    Tuesday, March 6, 2012 5:08 AM