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 additional workloads to cirrusci/windowsservercore:cmake? #9

Open
janpio opened this issue Jul 6, 2019 · 8 comments
Open

Add additional workloads to cirrusci/windowsservercore:cmake? #9

janpio opened this issue Jul 6, 2019 · 8 comments

Comments

@janpio
Copy link

janpio commented Jul 6, 2019

I'm trying to use cirrusci/windowsservercore:cmake but have to add a few workloads to Visual Studio (Microsoft.VisualStudio.Workload.Universal and Microsoft.VisualStudio.Component.Windows10SDK.10240).

From googling I found the visualstudio2017buildtools choco package, then on https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2017 I could get the workload IDs, which I combined to choco install visualstudio2017buildtools --params "--add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.Windows10SDK.10240". But when I try to run this in a script I get this error message:

C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call choco install visualstudio2017buildtools --params "--add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.Windows10SDK.10240" 
Chocolatey v0.10.13
Installing the following packages:
visualstudio2017buildtools
By installing you accept licenses for the packages.
visualstudio2017buildtools v15.9.11.0 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.
Chocolatey installed 0/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Warnings:
 - visualstudio2017buildtools - visualstudio2017buildtools v15.9.11.0 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Should I really use --force or is there another way to just add those workloads to the existing installation?

@janpio
Copy link
Author

janpio commented Jul 6, 2019

I also tried choco upgrade which also did not lead to success:

C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build>call choco upgrade visualstudio2017buildtools --params "--add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.Windows10SDK.10240" 
Chocolatey v0.10.13
Upgrading the following packages:
visualstudio2017buildtools
By upgrading you accept licenses for the packages.
visualstudio2017buildtools v15.9.11.0 is the latest version available based on your source(s).
Chocolatey upgraded 0/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

@fkorotkov
Copy link
Contributor

Right now it seems the only workaround is to force re-install but I don't mind to add support for universal apps. At the moment I'm trying to build an image with all the packages pre-install to see how big it will be.

@janpio
Copy link
Author

janpio commented Jul 8, 2019

That sounds like a good idea, I am hitting install errors when trying to install vs17community on the plain image: https://cirrus-ci.com/build/6301294078197760

@janpio
Copy link
Author

janpio commented Jul 9, 2019

Turns out the --params "--add ..." syntax didn't really work, but luckily the main workloads are also published as their own packages on choco:

    choco install visualstudio2017-workload-universal -y
    choco install visualstudio2017-workload-webcrossplat -y

With these commands I could add the two workloads that I needed.

It takes 20 minutes though, so having an image with all the workloads installed would definitely be a big improvement.

@fkorotkov
Copy link
Contributor

Nice! I was trying to add --package-parameters "--add Microsoft.VisualStudio.Workload.Universal --includeRecommended --locale en-US" and it was timing out yesterday after 2 hours. 😅Feel free to create a PR to add these packages to contrib/cmake/Dockerfile

@janpio
Copy link
Author

janpio commented Jul 9, 2019

These are for a very specific use case (Cordova Windows apps), which are probably useful just for me ;) Don't know enough about VS to suggest a better loadout of workloads.

@fkorotkov
Copy link
Contributor

Still timing out 🤔 Trying here: #10

@adunstan
Copy link
Contributor

adunstan commented Jan 5, 2021

Please also add all the optional components for vctools. ATM I am having to reinstall using:

choco install --force -y visualstudio2019-workload-vctools --package-parameters "--includeOptional"

which takes over 20 minutes :-(

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

No branches or pull requests

3 participants