Skip to content

DOC: BT for VisualStudio2022 #50144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions doc/source/development/contributing_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,41 @@ These packages will automatically be installed by using the ``pandas``

**Windows**

You will need `Build Tools for Visual Studio 2019
You will need `Build Tools for Visual Studio 2022
<https://visualstudio.microsoft.com/downloads/>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can link directly to BuildTools for VisualStudio2022.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we link directly, do we still need the below part of the instruction for installing a C compiler for Windows?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in, the warning "You DO NOT need to install Visual Studio 2022"?

might still be best to keep it, in case someone scrolls away from the exact location the link above

we could change it to .. note:: though, "warning" doesn't really reflect the severity of the paragraph 😄


.. warning::
You DO NOT need to install Visual Studio 2019.
You only need "Build Tools for Visual Studio 2019" found by
scrolling down to "All downloads" -> "Tools for Visual Studio 2019".
In the installer, select the "C++ build tools" workload.
You DO NOT need to install Visual Studio 2022.
You only need "Build Tools for Visual Studio 2022" found by
scrolling down to "All downloads" -> "Tools for Visual Studio".
In the installer, select the "Desktop development with C++" Workloads.

You can install the necessary components on the commandline using
`vs_buildtools.exe <https://download.visualstudio.microsoft.com/download/pr/9a26f37e-6001-429b-a5db-c5455b93953c/460d80ab276046de2455a4115cc4e2f1e6529c9e6cb99501844ecafd16c619c4/vs_BuildTools.exe>`_:
`vs_buildtools.exe <https://download.visualstudio.microsoft.com/download/pr/f3f8db49-2cd0-43df-9ced-12dcb6b3954b/1a327074f0b07f951467739a34f07c5db6b491aa5df2ed3e4054759ceb1c994d/vs_BuildTools.exe>`_:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an alternative to the above? If so, how did you find the instructions, are they referenced somewhere? Just wondering if there's a link we could put instead, and this section is long (and will be hard to keep up-to-date)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's OK to just link to https://learn.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?source=recommendations&view=vs-2022?

Something like

Alternatively, you can install the necessary components on the commandline use `vs_BuildTools.exe <https://learn.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?source=recommendations&view=vs-2022>`_

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is the new link to BuildTools for VisualStudio2022.

The instructions for installation are described at the link referenced above in the documentation. I received the detailed link by resolving the link behind Download button. The shorter form of the same link is https://aka.ms/vs/17/release/vs_BuildTools.exe. But I don't know which link will exist longer.

Agreed, I am not sure if we need to keep detailed instructions for the installation of the necessary components by using command-line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, let's remove then, if anyone wants to do it all via the command-line for some reason I think we can leave it to them to figure out - thanks for trying it out though!


.. code::

vs_buildtools.exe --quiet --wait --norestart --nocache ^
vs_BuildTools.exe --quiet --wait --norestart --nocache ^
--installPath C:\BuildTools ^
--add "Microsoft.VisualStudio.Workload.VCTools;includeRecommended" ^
--add Microsoft.VisualStudio.Component.VC.v141 ^
--add Microsoft.VisualStudio.Component.VC.v141.x86.x64 ^
--add Microsoft.VisualStudio.Component.Windows10SDK.17763
--add Microsoft.VisualStudio.Component.Roslyn.Compiler ^
--add Microsoft.Component.MSBuild ^
--add Microsoft.VisualStudio.Component.CoreBuildTools ^
--add Microsoft.VisualStudio.Workload.MSBuildTools ^
--add Microsoft.VisualStudio.Component.Windows10SDK ^
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^
--add Microsoft.VisualStudio.Component.Windows11SDK.22000 ^
--add Microsoft.VisualStudio.Component.VC.CMake.Project ^
--add Microsoft.VisualStudio.Component.TestTools.BuildTools ^
--add Microsoft.VisualStudio.Component.VC.ASAN ^
--add Microsoft.VisualStudio.Component.TextTemplating ^
--add Microsoft.VisualStudio.Component.VC.CoreIde ^
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^
--add Microsoft.VisualStudio.Workload.VCTools

To setup the right paths on the commandline, call
``"C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.16 10.0.17763.0``.
``C:\BuildTools\VC\Auxiliary\Build\vcvars64.bat``.

**macOS**

Expand Down