VisualStudioVersion is not set
See original GitHub issueFirst off – thanks for the hard work and contribution!
I’m working on a custom pipeline – the build step of my project uses a tool which must be run in the context of a VS dev prompt and relies on the variable VisualStudioVersion
.
Here’s a stripped down version of my pipeline:
jobs:
build:
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1.0.1
- name: Build ament source
run: colcon build --merge-install --cmake-args -A x64
working-directory: ./dev/ament
shell: cmd
The colcon build
command reports VisualStudioVersion is not set, please run within a Visual Studio Command Prompt.
I’m really new to GitHub actions so this very well could be user error. I’ve read some things about needing to explicity export environment variables to pipelines or does your extension take care of this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Ros2 windows10 colcon build fails on ros2_example_ws ...
... 'VisualStudioVersion is not set, ' RuntimeError: VisualStudioVersion is not set, please run within a Visual Studio Command Prompt.
Read more >ros2 can not build on visual studio 2019
I tried to use visual studio 2019 to build ros2 source code and it shows up the following errors by typing. colcon build...
Read more >Detect Visual Studio version from within MSBuild project
On 2008, VisualStudioVersion is NOT set. On 2010 (and up presumably) it is. Created a project in VS2008 with the following added after...
Read more >Default value of VisualStudioVersion - MSDN - Microsoft
I am trying to understand how default value of VisualStudioVersion is set. ... To clarify, I am building from command line, not from...
Read more >Visual Studio: environment variables
Although in Visual Studio 2017, vsvars32.bat is not under … ... Up to Visual Studio version 2015 (?), the installer set the environment...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe the tool’s authors thought that since you’re building for Windows, all this stuff will be already set and they can piggyback on these variables. It also may be that they look only at VisualStudioVersion and then infer other settings based on that.
I’ll merge it anyway since maybe it will be useful to someone else too.
Nevertheless, I’m happy that your issue got resolved one way or another. And that you’ve got some experience with GitHub Actions 😉
Thanks for the contribution!
I’ve pushed v1.1.0 which contains this fix.
Any of the following specs will pull the updated version: