none
Should property VCToolsInstallDir set by Visual Studio Installer or CUDA Installer? RRS feed

All replies

  • Your question is a closed question, and since I'm sure that you don't want a simple no as an answer, I'll treat this as if you asked "what should set the VCToolsInstallDir variable".

    There are two things that can set something of this name.

    1) The Visual C++ variables batch scripts, which are used to set up Visual C++ to run in a command line environment. These are run when you use the Developer Command Prompt or one of the platform tools command prompt. The script sets an environment variable name VCToolsInstallDir. The script works this out by looking at certain registry keys.

    2) MSBuild sets this, and this is what is available in the Visual Studio environment. MSBuild works this out by looking at certain registry keys.

    While the Visual Studio installer sets the registry keys that is used to work this information out, it is the build environment that makes this available.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    • Edited by Darran Rowe Thursday, June 13, 2019 1:47 AM
    Thursday, June 13, 2019 1:46 AM
  • Thank you for explaining what can set the property. It will be a big help in navigating to the root of my issue. I'm trying to get to the source of the issue explained in a question that I submitted earlier with the following title

           Visual Studio 2019 Community - VCToolsInstallDir property not defined.

    Your response indicates that the source of my issue may be the XML for the CUDA sample that MSBuild uses to decide on setting the property VCToolsInstallDir.  

    Do you have any suggestions for moving forward or things I can check?

    Thanks again

     

    Thursday, June 13, 2019 2:15 AM
  • Hi friend,

    Welcome to MSDN forum.

    >>Should property VCToolsInstallDir set by Visual Studio Installer or CUDA Installer?

    To ask your original post, the property is set by Visual Studio Installer instead of CUDA Installer.

    1.In other words, when execute the VS Installer to install some necessary C++ workloads and components, the Installer itself will set the property or the Installer will call C++ related .bat file to set the property. But this is obvious about VS Installer, not about CUDA Installer.

    2.More details: If we install VS with only C# workload, the property is not set since it's something about C++ workload. And if we choose to install C++ workload:

    Then there are some necessary components the installer will download by default:

    When installing the MSVC v142 component, the installer will creates the MSVC folder. And the subFolder 14.21.xx.(The version number is changed  with the VS update)

    And the full path of the Subfolder is the value of VCToolsInstallDir property. The value will be set right after the folder 14.xx being created.

    3.Also, I've tried to install CUDA and find it do install something into C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\BuildCustomizations , but it's won't affect the VCToolsInstaller, what the CUDA installer did is to add some third-party targets and related files into this folder.(BuildCustomizations folder: folder for some third-party custom build resource)

    Hope all above helps. And if my answer if helpful to resolve your title question, please mark it as accepted answer so that we can archive this thread for you.

    Looking forward to your reply :)

    Best regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 13, 2019 9:27 AM
  • Thank you very much for your help.

    I installed the Desktop Development with C++ Components and the build I was having trouble with cleared up.  

    Thursday, June 13, 2019 5:11 PM
  • Hi friend,

    It seems you've solved that issue. You could consider marking the helpful reply which resolve your issue as accepted answer, so that other members with similar issue could easily find it. Also, then we can archive this thread for you.

    Have a nice day!

    Best Regards
    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 20, 2019 10:26 AM