mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[Windows 2019] Fix missing msvcr100.dll (#1427)
* install vcredist2010 * Microsoft Visual C++ docs section
This commit is contained in:
committed by
GitHub
parent
2602d38877
commit
9110b38999
@@ -119,6 +119,11 @@ if (Test-IsWin16) {
|
|||||||
Choco-Install -PackageName vcredist140
|
Choco-Install -PackageName vcredist140
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Test-IsWin19) {
|
||||||
|
# Install vcredist2010
|
||||||
|
Choco-Install -PackageName vcredist2010
|
||||||
|
}
|
||||||
|
|
||||||
# Expand disk size of OS drive
|
# Expand disk size of OS drive
|
||||||
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
|
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
|
||||||
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
|
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
|
||||||
|
|||||||
@@ -173,6 +173,11 @@ $markdown += New-MDNewLine
|
|||||||
$markdown += ((Get-VisualStudioComponents) + (Get-VisualStudioExtensions)) | New-MDTable
|
$markdown += ((Get-VisualStudioComponents) + (Get-VisualStudioExtensions)) | New-MDTable
|
||||||
$markdown += New-MDNewLine
|
$markdown += New-MDNewLine
|
||||||
|
|
||||||
|
$markdown += New-MDHeader "Microsoft Visual C++:" -Level 4
|
||||||
|
$markdown += New-MDNewLine
|
||||||
|
$markdown += Get-VisualCPPComponents | New-MDTable
|
||||||
|
$markdown += New-MDNewLine
|
||||||
|
|
||||||
$markdown += New-MDHeader ".NET Core SDK" -Level 3
|
$markdown += New-MDHeader ".NET Core SDK" -Level 3
|
||||||
$sdk = Get-DotnetSdks
|
$sdk = Get-DotnetSdks
|
||||||
$markdown += "``Location $($sdk.Path)``"
|
$markdown += "``Location $($sdk.Path)``"
|
||||||
|
|||||||
@@ -223,4 +223,21 @@ function Get-NewmanVersion {
|
|||||||
|
|
||||||
function Get-GHVersion {
|
function Get-GHVersion {
|
||||||
return "GitHub CLI $(gh --version)"
|
return "GitHub CLI $(gh --version)"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-VisualCPPComponents {
|
||||||
|
$vcpp = Get-CimInstance -ClassName Win32_Product -Filter "Name LIKE 'Microsoft Visual C++%'"
|
||||||
|
$vcpp | Sort-Object Name, Version | ForEach-Object {
|
||||||
|
$isMatch = $_.Name -match "^(?<Name>Microsoft Visual C\+\+ \d{4})\s+(?<Arch>\w{3})\s+(?<Ext>.+)\s+-"
|
||||||
|
if ($isMatch) {
|
||||||
|
$name = '{0} {1}' -f $matches["Name"], $matches["Ext"]
|
||||||
|
$arch = $matches["Arch"].ToLower()
|
||||||
|
$version = $_.Version
|
||||||
|
[PSCustomObject]@{
|
||||||
|
Name = $name
|
||||||
|
Architecture = $arch
|
||||||
|
Version = $version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user