Skip to content
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

Add MSVC v142 - VS 2019 C++ x64/x86 Build Tools (v14.25) #1076

Closed
2 of 6 tasks
mbonani opened this issue Jun 18, 2020 · 9 comments
Closed
2 of 6 tasks

Add MSVC v142 - VS 2019 C++ x64/x86 Build Tools (v14.25) #1076

mbonani opened this issue Jun 18, 2020 · 9 comments
Assignees
Labels

Comments

@mbonani
Copy link

mbonani commented Jun 18, 2020

Tool information

Area for Triage:
"C/C++" Visual Studio

Question, Bug, or Feature?:
"Question" "Feature"

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?
If yes I want to know how

Tool installation time in runtime

Are you willing to submit a PR?

@mbonani mbonani changed the title Update/Add [tool name] Add MSVC v142 - VS 2019 C++ x64/x86 Build Tools (v14.25) Jun 18, 2020
@mbonani
Copy link
Author

mbonani commented Jun 18, 2020

Finaly I get a work arround.
We compile using CMake and with latest Visual Studio 16.6, it is not compiling, so I wanted to use MSVC v14.25.
Normally you can choose that whith cmake option
-T version=14.25
but we get this error:

CMake Error at D:/a/1/b/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project):
  Generator
    Visual Studio 16 2019
  given toolset and version specification
    v142,version=14.25
  does not seem to be installed at
    C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/14.25/Microsoft.VCToolsVersion.14.25.props

finaly installing component using this script :

- powershell: |
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
        $client = new-object System.Net.WebClient
        $client.DownloadFile("$(visual_bootstrapper)","vs_enterprise.exe")
        .\vs_enterprise.exe modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --add Microsoft.VisualStudio.Component.VC.14.25.x86.x64 --passive --wait

that runs only 8s makes our build work again.

So my question is: "can we avoid this installation as it seems component is somehow there?"

our yml file: https://github.com/Mobsya/aseba/blob/master/azure-pipelines.yml

@maxim-lobanov
Copy link
Contributor

Thank you for feature request, we will consider pre-installing this component

@mbonani
Copy link
Author

mbonani commented Jun 19, 2020

Thank for considering.
My work around do not work all the time, sometimes /Build/14.25/ is found sometime not.
What can I do to ensure it?
Our pipeline : https://dev.azure.com/mobsya/Thymio%20Software%20Suite/_build?definitionId=6&_a=summary

@maxim-lobanov
Copy link
Contributor

Unfortunately, no idea why installation is not stable in runtime. We use the following code to install VS during image generation: https://github.com/actions/virtual-environments/blob/master/images/win/scripts/ImageHelpers/InstallHelpers.ps1#L66

@miketimofeev
Copy link
Contributor

@mbonani we already have vsinstaller on VM so you are able to use something like this and it can be a more stable option:

      - name: Add Component
        shell: cmd
        run: |
          "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --channelId VisualStudio.16.Release --productId Microsoft.VisualStudio.Product.Enterprise -q --includeRecommended --add "Microsoft.VisualStudio.Component.VC.14.25.x86.x64"

@mbonani
Copy link
Author

mbonani commented Jun 19, 2020

@miketimofeev Thank for your advise.
With your command line this process take arround 15min, at least we are sure it is installed.
So please consider pre-installing this component, specially when a new compiler come out so that people can minor version in case of problem until new version is stabilised.

@andy-mishechkin
Copy link
Contributor

Microsoft.VisualStudio.Component.VC.14.25.x86.x64 has been added to Visual Studio deployment.
You can find this component in the next week (after next Windows image deployment)

@mbonani
Copy link
Author

mbonani commented Jul 7, 2020

Thanks all is working.

@mbonani mbonani closed this as completed Jul 7, 2020
liu-kan added a commit to liu-kan/gSMFRETda that referenced this issue Nov 23, 2021
liu-kan added a commit to liu-kan/gSMFRETda that referenced this issue Nov 23, 2021
liu-kan added a commit to liu-kan/gSMFRETda that referenced this issue Nov 23, 2021
del submod

Removed submodule

[no ci] link right lib

[no ci] add getopt-for-visual-studio/20200201
@YassineBENR
Copy link

MSVC v142 - VS 2019 C++ x64/x86 build tools : how can i add it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants