Rosanswers logo

Goal: I intend to install ROS2 Dashing on Windows. I am building from source following the instructions in https://index.ros.org/doc/ros2/Installation/Dashing/Windows-Development-Setup/.

Issue: When running colcon build --merge-install from the Visual Studio Developer Command Prompt each package starts to be built. However, it fails on the same error:

--- stderr: <package>
CMake Error at CMakeLists.txt:2 (project):

    Visual Studio 16 2019

  could not find any instance of Visual Studio.

I have added an AMENT_IGNORE file to each package to see if the problem is with an individual package, but the error is occuring in every package.

Thank you in advance for any assistance.

Originally posted by Tav_PG on ROS Answers with karma: 28 on 2019-10-02

Post score: 0

Original comments

Comment by cangyin on 2019-12-29:
I am also struggling on similar problem, hope this will help: https://stackoverflow.com/questions/51668676/cmake-visual-studio-15-2017-could-not-find-any-instance-of-visual-studio


1 Answer 1


Rosanswers logo

Apology: Firstly I would like to apologise, I'm under some pressure to get ROS2 installed on Windows, and I am posting some issues that I resolve soon after posting them! (sorry) However, more information for the community is better, just in case someone else runs into the same issue.

Appreciation: Thank you cangyin for your input. You found the solution.

Cause: When following the https://index.ros.org/doc/ros2/Installation/Dashing/Windows-Install-Binary/ instructions at the "Install Visual Studio" section it states,

Make sure that no C++ CMake tools are installed by unselecting them in the list of components to be installed.

I was slightly confused that the accompanying screenshot in the instructions shows 'Visual C++ tools for CMake' checked. So at this point I thought it would be 'safer' :-) to uncheck all the optional components. This was my downfall.


[1] Open Visual Studio

[2] On the menu go to Tools > Get Tools and Features

[3] Make sure the "Desktop development with C++" tab is enabled (checked) under the "Workloads" section

[4] In the right side panel

Thanks again to cangyin

Originally posted by Tav_PG with karma: 28 on 2020-01-05

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.