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

WindowsPB : Add Visual Studio 2022 installation #3172

Merged
merged 10 commits into from
Sep 12, 2023

Conversation

steelhead31
Copy link
Contributor

@steelhead31 steelhead31 commented Sep 1, 2023

Fixes #3168

Install VS2022 on windows 10 & 11, and Windows Server 2016, 2019 & 2022, either from a pre-defined layout or from the community download in a similar fashion to VS2019.

VS2022 is now a 64-bit application.

Checklist

VPC passed: https://ci.adoptium.net/job/VagrantPlaybookCheck/1725/

Add checksum verification for VS2019 layout
@gdams
Copy link
Member

gdams commented Sep 5, 2023

@steelhead31 I believe that VS2022 has a Native arm64 version. We probably want to make sure that the correct version gets installed on our arm64 hosts if possible. (This might already be happening but thought it was worth checking)

@gdams
Copy link
Member

gdams commented Sep 5, 2023

@steelhead31 I believe that VS2022 has a Native arm64 version. We probably want to make sure that the correct version gets installed on our arm64 hosts if possible. (This might already be happening but thought it was worth checking)

There is a single installer for both Visual Studio x64 and Arm64 architectures. The Visual Studio 2022 installer detects if the system architecture is Arm64 and if so, it'll download and install the Arm64 version of Visual Studio on your Arm64 device (support is for Windows 11). If you are installing the product via a layout, you'll need to explicitly configure the layout to include ARM binaries.

So it looks like we need to configure our layout file to support these files if we haven't already

…2/tasks/main.yml

Co-authored-by: George Adams <george.adams@microsoft.com>
steelhead31 and others added 2 commits September 5, 2023 10:50
…2/tasks/main.yml

Co-authored-by: George Adams <george.adams@microsoft.com>
…2/tasks/main.yml

Co-authored-by: George Adams <george.adams@microsoft.com>
@andrew-m-leonard
Copy link
Contributor

andrew-m-leonard commented Sep 5, 2023

@steelhead31 I believe that VS2022 has a Native arm64 version. We probably want to make sure that the correct version gets installed on our arm64 hosts if possible. (This might already be happening but thought it was worth checking)

There is a single installer for both Visual Studio x64 and Arm64 architectures. The Visual Studio 2022 installer detects if the system architecture is Arm64 and if so, it'll download and install the Arm64 version of Visual Studio on your Arm64 device (support is for Windows 11). If you are installing the product via a layout, you'll need to explicitly configure the layout to include ARM binaries.

So it looks like we need to configure our layout file to support these files if we haven't already

@gdams We created the install layout using the following:

vs_community.exe --layout VSLayout2022 --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended;includeOptional --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --add Microsoft.VisualStudio.Component.VC.MFC.ARM64

Which includes ARM64

@gdams
Copy link
Member

gdams commented Sep 5, 2023

@steelhead31 I believe that VS2022 has a Native arm64 version. We probably want to make sure that the correct version gets installed on our arm64 hosts if possible. (This might already be happening but thought it was worth checking)

There is a single installer for both Visual Studio x64 and Arm64 architectures. The Visual Studio 2022 installer detects if the system architecture is Arm64 and if so, it'll download and install the Arm64 version of Visual Studio on your Arm64 device (support is for Windows 11). If you are installing the product via a layout, you'll need to explicitly configure the layout to include ARM binaries.
So it looks like we need to configure our layout file to support these files if we haven't already

@gdams We created the install layout using the following:

vs_community.exe --layout VSLayout2022 --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended;includeOptional --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --add Microsoft.VisualStudio.Component.VC.MFC.ARM64

@andrew-m-leonard can you please add --arch all to that command as that will generate an x64 only Layout file.

@steelhead31 steelhead31 marked this pull request as ready for review September 8, 2023 12:56
@steelhead31
Copy link
Contributor Author

steelhead31 commented Sep 8, 2023

@steelhead31 steelhead31 marked this pull request as draft September 8, 2023 13:56
@steelhead31
Copy link
Contributor Author

Requires a fix for vs2022 dll registration.

@steelhead31
Copy link
Contributor Author

VPC is currently failing on windows 2012, as VS2022 isn't supported, I'll update the playbook to only install when its only on a supported version.

@steelhead31 steelhead31 force-pushed the fix_issue_3168 branch 2 times, most recently from 033e331 to 492d8a8 Compare September 10, 2023 09:15
Include msvs_2022

Include msvs_2022

restore vs2017 params

Update checksum for new vs2022 layout

include dll registration for vs2022 layout install

Fix MSVS_2022 logs

Fix tags

Fix DLL Registration

Ensure install check is run

Run check

Fix installation logic

Fix vs2022 check

Fix conditionals

Fix installation bugs
@steelhead31 steelhead31 marked this pull request as ready for review September 10, 2023 21:11
Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

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

looks good

Co-authored-by: George Adams <george.adams@microsoft.com>
@steelhead31 steelhead31 merged commit 6dff77f into adoptium:master Sep 12, 2023
7 checks passed
@steelhead31 steelhead31 deleted the fix_issue_3168 branch September 12, 2023 13:33
@sxa sxa added this to the 2023-09 (September) milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ansible request for Visual Studio 2022 on Windows x64 & Arm64
4 participants