none
VCTargetsPath is empty RRS feed

  • Question

  • Im Using the Microsoft Build Tools 2015 an a build agent.

    Compilation of the a VC++ project with msbuild fails because VCTargetsPath.

    Registry entry seems to be correct. The path is set for tool version 4.0 and 14.0

    How do i get the registry value in my environment?

    Wednesday, April 6, 2016 9:42 AM

Answers

  • Hi mik1024,

    >> Registry entry seems to be correct. The path is set for tool version 4.0 and 14.0

    For this, as I searched, you’d better make sure both of below registry keys are in your machine. If one of them is missing, please add it.

    • 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\

    >> How do i get the registry value in my environment?

    If you want to use MSBuild to get the registry value, you could refer to below link that’s bout MSBuild property functions “GetRegistryValueFromView”.

    https://msdn.microsoft.com/en-us/library/dd633440.aspx#BKMK_GetRegistryValueFromView

    You could call like this:

    <PropertyGroup>

    <CrmPath>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM', 'CRM_Server_InstallDir', null, RegistryView.Registry64, RegistryView.Registry32))</CrmPath>

    </PropertyGroup>

    Or, you typing enter Win+R -> “regedit” to access the Registry.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 8, 2016 1:20 AM

All replies

  • Install Visual Studio Express Edition. The Build Tools com eonly with a C# Toolset
    Thursday, April 7, 2016 7:09 AM
  • Hi mik1024,

    >> Registry entry seems to be correct. The path is set for tool version 4.0 and 14.0

    For this, as I searched, you’d better make sure both of below registry keys are in your machine. If one of them is missing, please add it.

    • 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\

    >> How do i get the registry value in my environment?

    If you want to use MSBuild to get the registry value, you could refer to below link that’s bout MSBuild property functions “GetRegistryValueFromView”.

    https://msdn.microsoft.com/en-us/library/dd633440.aspx#BKMK_GetRegistryValueFromView

    You could call like this:

    <PropertyGroup>

    <CrmPath>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM', 'CRM_Server_InstallDir', null, RegistryView.Registry64, RegistryView.Registry32))</CrmPath>

    </PropertyGroup>

    Or, you typing enter Win+R -> “regedit” to access the Registry.

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 8, 2016 1:20 AM