DotNetCoreCLI@2 publish no longer restores .Net Maui Asp.net 7.0 iOS app
See original GitHub issueQuestion, Bug, or Feature?
Type: Bug
Enter Task Name: DotNetCoreCLI@2
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
- Server - Azure Pipelines or TFS on-premises?
Azure Pipeline #20221213.2
- Agent - Hosted or Private:
Hosted Agent, no idea what the queue name is
Issue Description
Yesterday, I performed several builds using my Azure Pipeline. Today, the same Azure Pipeline no longer works. Did something get changed? Yesterday, I did 9 builds. Today, I’ve had 7 failed attempts. I made one minor change to the .Net Maui app that I have since reverted back.
- task: DotNetCoreCLI@2
displayName: 'dotnet publish (Debug)'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'MyAppName.sln'
arguments: '-f:net7.0-ios16.0 -c:Debug /p:ArchiveOnBuild=true /p:EnableAssemblyILStripping=false --runtime ios-arm64 --self-contained'
zipAfterPublish: false
modifyOutputPath: false
Task logs
BEGIN FAILIRE LOG
2022-12-13T17:28:59.6004830Z ##[section]Starting: dotnet publish (Debug) 2022-12-13T17:28:59.6019820Z ============================================================================== 2022-12-13T17:28:59.6020170Z Task : .NET Core 2022-12-13T17:28:59.6020840Z Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command 2022-12-13T17:28:59.6021210Z Version : 2.210.0 2022-12-13T17:28:59.6021650Z Author : Microsoft Corporation 2022-12-13T17:28:59.6022590Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli 2022-12-13T17:28:59.6023030Z ============================================================================== 2022-12-13T17:29:00.2240350Z Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you’re using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version. 2022-12-13T17:29:00.2316740Z [command]/Users/runner/hostedtoolcache/dotnet/dotnet publish /Users/runner/work/1/s/MyAppName.sln -f:net7.0-ios16.0 -c:Debug /p:ArchiveOnBuild=true /p:EnableAssemblyILStripping=false --runtime ios-arm64 --self-contained 2022-12-13T17:29:00.4953220Z MSBuild version 17.4.0+18d5aef85 for .NET 2022-12-13T17:29:01.4312560Z Determining projects to restore… 2022-12-13T17:29:29.1972010Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2073460Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Runtime 2.5.2.1 -> Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2176340Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2276240Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2380170Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Runtime 2.5.2.1 -> Xamarin.AndroidX.Lifecycle.ViewModel.Ktx 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2483050Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2585470Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2688900Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Common 2.5.2.1 -> Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2788860Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2891200Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.2992080Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Common 2.5.2.1 -> Xamarin.AndroidX.Lifecycle.ViewModel.Ktx 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3076720Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3131070Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3186910Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Common 2.5.2.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3216040Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3227230Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3254620Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Legacy.Support.V4 1.0.0.15 -> Xamarin.AndroidX.Fragment 1.5.3.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3258640Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3259910Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3284180Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Fragment 2.5.2.1 -> Xamarin.AndroidX.Fragment.Ktx 1.5.3.1 -> Xamarin.AndroidX.Lifecycle.ViewModel.Ktx 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3286840Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3306050Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3312720Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Fragment 2.5.2.1 -> Xamarin.AndroidX.SlidingPaneLayout 1.2.0.3 -> Xamarin.AndroidX.Window 1.0.0.10 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3340380Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3368300Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3386610Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Legacy.Support.V4 1.0.0.15 -> Xamarin.AndroidX.Legacy.Support.Core.UI 1.0.0.16 -> Xamarin.AndroidX.SlidingPaneLayout 1.2.0.3 -> Xamarin.AndroidX.Window 1.0.0.10 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3389670Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3409110Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3417750Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.UI 2.5.2.1 -> Xamarin.AndroidX.Transition 1.4.1.8 -> Xamarin.AndroidX.Fragment 1.5.3.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3419430Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3439320Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3458240Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Fragment 2.5.2.1 -> Xamarin.AndroidX.Fragment.Ktx 1.5.3.1 -> Xamarin.AndroidX.Activity.Ktx 1.6.0.1 -> Xamarin.AndroidX.Lifecycle.Runtime.Ktx 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3487250Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3517030Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3551660Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Fragment 2.5.2.1 -> Xamarin.AndroidX.Fragment.Ktx 1.5.3.1 -> Xamarin.AndroidX.Fragment 1.5.3.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3580400Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3610560Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3640800Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Runtime 2.5.2.1 -> Xamarin.AndroidX.Activity.Ktx 1.6.0.1 -> Xamarin.AndroidX.Activity 1.6.0.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3667450Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3669660Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3688610Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Fragment 2.5.2.1 -> Xamarin.AndroidX.Fragment.Ktx 1.5.3.1 -> Xamarin.AndroidX.Activity.Ktx 1.6.0.1 -> Xamarin.AndroidX.Activity 1.6.0.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3708240Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3720050Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: Detected package downgrade: Xamarin.Kotlin.StdLib.Jdk8 from 1.7.20.1 to 1.7.10. Reference the package directly from the project to select a different version. [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3748910Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.AndroidX.Navigation.Fragment 2.5.2.1 -> Xamarin.AndroidX.SlidingPaneLayout 1.2.0.3 -> Xamarin.AndroidX.Transition 1.4.1.8 -> Xamarin.AndroidX.Fragment 1.5.3.1 -> Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.5.1.1 -> Xamarin.KotlinX.Coroutines.Android 1.6.4.1 -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.20.1) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3778190Z /Users/runner/work/1/s/MyAppName.csproj : error NU1605: MyAppName -> Xamarin.Kotlin.StdLib.Jdk8 (>= 1.7.10) [/Users/runner/work/1/s/MyAppName.sln] 2022-12-13T17:29:29.3811720Z Failed to restore /Users/runner/work/1/s/MyAppName.csproj (in 26.43 sec). 2022-12-13T17:29:29.4239280Z ##[error]Error: The process ‘/Users/runner/hostedtoolcache/dotnet/dotnet’ failed with exit code 1 2022-12-13T17:29:29.4256670Z ##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build 2022-12-13T17:29:29.4260580Z Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting 2022-12-13T17:29:29.4264200Z ##[error]Dotnet command failed with non-zero exit code on the following projects : /Users/runner/work/1/s/MyAppName.sln 2022-12-13T17:29:29.4273340Z ##[section]Finishing: dotnet publish (Debug)
END FAILURE LOG
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
[Insert error from the logs here for a quick overview]
Issue Analytics
- State:
- Created 9 months ago
- Comments:6
Take a look at this comment and the thread to learn how to resolve this issue.
https://github.com/actions/runner-images/issues/6771#issuecomment-1354713617
I was finally able to get my iOS app to Build using what I think is the configuration for the first .Net Maui release. This does not fix the current problem, but at least I can Build my app again.
Here is part of the script that I used.
Tell the Pipeline to use Asp.net 7.0.100.
Tell the Pipeline to use .Net Maui 7.0.1xx.
https://github.com/dotnet/maui/tree/release/7.0.1xx
This is where 7.0.1xx was upgraded to microsoft.net.sdk.ios version 16.0.1478.
https://github.com/dotnet/maui/commit/e5c8224dc180c45cdce125452d127ad3e98311bb
Tell the Pipeline to use xamarin-sdk.sh 17_4_0_301. This was the last version of the Xamarin SDK before the upgrade to 17.4.3 .