Skip to content

Commit

Permalink
ansible: add vs2022 installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanStojanovic committed Mar 22, 2023
1 parent 04aa8b9 commit edf5b0b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/roles/visual-studio/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
when: "'vs2019' in inventory_hostname"
include_tasks: "partials/vs2019.yml"

- name: install Visual Studio 2022
when: "'vs2022' in inventory_hostname"
include_tasks: "partials/vs2022.yml"

# Install clcache and apply patches known to work
- block:
- name: check if clcache is already cloned
Expand Down
29 changes: 29 additions & 0 deletions ansible/roles/visual-studio/tasks/partials/vs2022.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---

#
# Install Visual Studio 2022
#


- name: install Visual Studio Community 2022
win_chocolatey: name=visualstudio2022community

# Note: The .NET SDK was added as a prerequisite for WiX4 - https://github.com/nodejs/node/pull/45943
- name: install Visual Studio Community 2022 Native Desktop Workload
win_chocolatey:
name: visualstudio2022-workload-nativedesktop
params: '--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --add Microsoft.NetCore.Component.SDK'

- name: install WiX Toolset
import_tasks: 'wixtoolset.yml'

# Note: https://chocolatey.org/docs/helpers-install-chocolatey-vsix-package exists, but
# can't be used with VS2022 yet: https://github.com/chocolatey/choco/issues/1201

- name: download WiX Toolset Visual Studio Extension
win_get_url:
url: 'https://github.com/wixtoolset/VisualStudioExtension/releases/download/v1.0.0.22/Votive2022.vsix'
dest: 'C:\TEMP\Votive2022.vsix'

- name: install WiX Toolset Visual Studio Extension
win_shell: '& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VSIXInstaller.exe" /quiet C:\TEMP\Votive2022.vsix'

0 comments on commit edf5b0b

Please sign in to comment.