Skip to content

Commit 5e5d5e9

Browse files
committed
Added .NET40 and .NET48 via VS installer
1 parent 9646902 commit 5e5d5e9

File tree

3 files changed

+48
-9
lines changed

3 files changed

+48
-9
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,23 @@ jobs:
3939
# this is fixed to just one version so we only run the analysis operation once, not once for each version of the runtime
4040
dotnet-version: [ '8.0.x' ]
4141
steps:
42-
- name: Install .NET Framework 4.0 Developer Pack
42+
- name: Install DNF 4.0 packs
43+
shell: pwsh
44+
working-directory: "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer"
4345
run: |
44-
Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/5/7/157F3F3E-3E3B-4F6E-9F3C-3D3E3F3E3F3E/NDP40-DevPack-KB2600211-x86-x64.exe" -OutFile "ndp40.exe"
45-
Start-Process -FilePath "ndp40.exe" -ArgumentList "/quiet" -Wait
46+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
47+
$WorkLoads = '--add Microsoft.Net.Component.4.0.SDK --add Microsoft.Net.Component.4.0.TargetingPack --add Microsoft.Net.ComponentGroup.4.0.DeveloperTools'
48+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, $WorkLoads, '--quiet', '--norestart', '--nocache')
49+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
50+
51+
- name: Install DNF 4.8 packs
52+
shell: pwsh
53+
working-directory: "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer"
54+
run: |
55+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
56+
$WorkLoads = '--add Microsoft.Net.Component.4.8.SDK --add Microsoft.Net.Component.4.8.TargetingPack --add Microsoft.Net.ComponentGroup.4.8.DeveloperTools'
57+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, $WorkLoads, '--quiet', '--norestart', '--nocache')
58+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
4659
4760
- name: Checkout Code
4861
uses: actions/checkout@v4

.github/workflows/dotnetcore.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,23 @@ jobs:
1515
# dotnet-version: [ '3.1.x', '5.0.x', '6.0.x', '7.0.x' ]
1616
dotnet-version: [ '8.0.x' ]
1717
steps:
18-
- name: Install .NET Framework 4.0 Developer Pack
18+
- name: Install DNF 4.0 packs
19+
shell: pwsh
20+
working-directory: "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer"
1921
run: |
20-
Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/5/7/157F3F3E-3E3B-4F6E-9F3C-3D3E3F3E3F3E/NDP40-DevPack-KB2600211-x86-x64.exe" -OutFile "ndp40.exe"
21-
Start-Process -FilePath "ndp40.exe" -ArgumentList "/quiet" -Wait
22+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
23+
$WorkLoads = '--add Microsoft.Net.Component.4.0.SDK --add Microsoft.Net.Component.4.0.TargetingPack --add Microsoft.Net.ComponentGroup.4.0.DeveloperTools'
24+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, $WorkLoads, '--quiet', '--norestart', '--nocache')
25+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
26+
27+
- name: Install DNF 4.8 packs
28+
shell: pwsh
29+
working-directory: "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer"
30+
run: |
31+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
32+
$WorkLoads = '--add Microsoft.Net.Component.4.8.SDK --add Microsoft.Net.Component.4.8.TargetingPack --add Microsoft.Net.ComponentGroup.4.8.DeveloperTools'
33+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, $WorkLoads, '--quiet', '--norestart', '--nocache')
34+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
2235
2336
- name: Checkout Code
2437
uses: actions/checkout@v4

.github/workflows/publish.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,23 @@ jobs:
1919
# this is fixed to just one version so we only run the push operation once
2020
dotnet-version: [ '8.0.x' ]
2121
steps:
22-
- name: Install .NET Framework 4.0 Developer Pack
22+
- name: Install DNF 4.0 packs
23+
shell: pwsh
24+
working-directory: "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer"
2325
run: |
24-
Invoke-WebRequest -Uri "https://download.microsoft.com/download/1/5/7/157F3F3E-3E3B-4F6E-9F3C-3D3E3F3E3F3E/NDP40-DevPack-KB2600211-x86-x64.exe" -OutFile "ndp40.exe"
25-
Start-Process -FilePath "ndp40.exe" -ArgumentList "/quiet" -Wait
26+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
27+
$WorkLoads = '--add Microsoft.Net.Component.4.0.SDK --add Microsoft.Net.Component.4.0.TargetingPack --add Microsoft.Net.ComponentGroup.4.0.DeveloperTools'
28+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, $WorkLoads, '--quiet', '--norestart', '--nocache')
29+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
30+
31+
- name: Install DNF 4.8 packs
32+
shell: pwsh
33+
working-directory: "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer"
34+
run: |
35+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
36+
$WorkLoads = '--add Microsoft.Net.Component.4.8.SDK --add Microsoft.Net.Component.4.8.TargetingPack --add Microsoft.Net.ComponentGroup.4.8.DeveloperTools'
37+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, $WorkLoads, '--quiet', '--norestart', '--nocache')
38+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
2639
2740
- name: Checkout Code
2841
uses: actions/checkout@v4

0 commit comments

Comments
 (0)