Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Fix remaining permanent CI warnings. (#8595)
Fix various CI warnings, such as: Specifying an exact version is not recommended on Microsoft-Hosted agents. Patch versions of Python can be replaced by new ones on Hosted agents without notice, which will cause builds to fail unexpectedly. It is recommended to specify only major or major and minor version (Example: `3` or `3.9`) Fix: only specify `major.minor` as requested. Or [MSB4011][0]: build-tools\scripts\RunTests.targets(3,3): Warning MSB4011: "C:\a\_work\1\s\Directory.Build.props" cannot be imported again. It was already imported at "C:\a\_work\1\s\build-tools\scripts\PrepareWindows.targets(3,3)". This is most likely a build authoring error. This subsequent import will be ignored. build-tools\scripts\RunTests.targets(7,3): Warning MSB4011: "C:\a\_work\1\s\Configuration.props" cannot be imported again. It was already imported at "C:\a\_work\1\s\build-tools\scripts\PrepareWindows.targets(11,3)". This is most likely a build authoring error. This subsequent import will be ignored. tests\api-compatibility\api-compatibility.targets(3,3): Warning MSB4011: "C:\a\_work\1\s\Configuration.props" cannot be imported again. It was already imported at "C:\a\_work\1\s\build-tools\scripts\PrepareWindows.targets(11,3)". This is most likely a build authoring error. This subsequent import will be ignored. Fix: add a flag denoting that we have already imported a project and a `Condition` to prevent duplicate imports. Or [CS8604][1]: build-tools\xaprepare\xaprepare\Application\Context.cs(608,42): Warning CS8604: Possible null reference argument for parameter 'path1' in 'string Path.Combine(string path1, string path2)'. Fix: add null check. Or: EXEC(0,0): Warning : dotnet archive URL https://dotnetcli.azureedge.net/dotnet/Sdk/9.0.100-alpha.1.23610.1/dotnet-sdk-9.0.100-alpha.1.23610.1-win-x64.zip not found Fix: checking multiple URLs is part of the expected flow; downgrade the message to "info". Or: EXEC(0,0): Warning : Duplicate Third Party Notice 'IronyProject/Irony' (old class: Xamarin.Android.Prepare.XamarinAndroidBuildTasks_IronyProject_Irony_TPN; new class: Xamarin.Android.Prepare.XamarinAndroidToolsAidl_IronyProject_Irony_TPN) Fix: multiple projects may use the same dependencies; downgrade the message to "info". The remaining CI warnings are temporary because our MAUI integration tests are currently failing: ![image](https://github.com/xamarin/xamarin-android/assets/179295/1455637d-3f8d-4582-b5c8-50a23b1b8b25) [0]: https://learn.microsoft.com/visualstudio/msbuild/errors/msb4011 [1]: https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/nullable-warnings#possible-null-assigned-to-a-nonnullable-reference
- Loading branch information