runner-images
runner-images copied to clipboard
Xamarin workload is missing or not installed in windows-2022 20220814.1
Description
Building a xamarin.ios library using windows-2022 20220814.1 results in failures such as this one:
C:\Users\VssAdministrator\.nuget\packages\msbuild.sdk.extras\3.0.23\Build\LanguageTargets\CheckMissing.targets(44,5): error : The specified language targets for xamarinios10 is missing. Ensure correct tooling is installed for 'xamarinios'. Missing: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.CSharp.targets' [D:\a\1\s\src\library\Uno.Material\Uno.Material.csproj]
Curiously, the image is supposed to have it installed with Component.Xamarin
, but in general installing VS 17.3 on a desktop does not install it by default. It could be related.
Platforms affected
- [X] Azure DevOps
- [ ] GitHub Actions
Virtual environments affected
- [ ] Ubuntu 18.04
- [ ] Ubuntu 20.04
- [ ] Ubuntu 22.04
- [ ] macOS 10.15
- [ ] macOS 11
- [ ] macOS 12
- [ ] Windows Server 2019
- [X] Windows Server 2022
Image version and build link
20220814.1
Is it regression?
yes, it worked with the previous agents builds
Expected behavior
Builds are completing properly
Actual behavior
C:\Users\VssAdministrator\.nuget\packages\msbuild.sdk.extras\3.0.23\Build\LanguageTargets\CheckMissing.targets(44,5): error : The specified language targets for xamarinios10 is missing. Ensure correct tooling is installed for 'xamarinios'. Missing: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.CSharp.targets' [D:\a\1\s\src\library\Uno.Material\Uno.Material.csproj]
Repro steps
Build any Xamarin library.
Hey @jeromelaban. We have been starting a new image rollout and this component is not pre-installed by default - https://github.com/actions/runner-images/pull/6078. I will add it back.
As a temporary workaround, this component can be installed in runtime:
- run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd = @(
"Component.Xamarin"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
Write-Host "components have been successfully added"
}
else
{
Write-Host "components were not installed"
exit 1
}
Thanks for the workaround, I'll keep it handy in case this happens in the future :) Also as an FYI, a rollback has been made and builds are running on 20220808.1
.
Update again, it looks like the rollback was rollbacked and I'm back on 20220814.1
.
Having the same issue here. Do we think this one will be fixed soon? Workaround seems to work ok for me at the minute
@WilliamWatterson86 , we are planning to start a new image rollout on Monday.
Also, as a note, testing is difficult because agents are balanced between 20220814.1
and 20220808.1
, making builds pass or fail randomly.
Actually the workaround didnt work for me, it got past the nuget restore step (which was the one failing previously), but this time it fails with an AOT error. Build works fine when it uses agent with version 20220808.1. Is there any way to force my pipeline to use this agent version?
Agreed, if we could force using 20220808.1, it would solve a lot of headaches. Waiting until Monday is sub-optimal.
We have been starting a new image rollout - https://github.com/actions/runner-images/pull/6102. I hope this helps.
@al-cheb Thanks for addressing this quickly, it's very much appreciated.
@jeromelaban, The new image with Component.Xamarin
has been deployed.