-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find file AssetPackManifestTemplate.plist in "WriteAssetPackManifest" task when run in DevOps #19669
Comments
Can you get a binlog from the failing build in Azure DevOps? You can get a binlog by adding
and then attach the resulting msbuild.binlog here. |
@rolfbjarne thank you for the response on this issue. I have attached the bin log. |
I thought perhaps using the output parameter in the publish command ("-o $(build.artifactstagingdirectory)") could have resulted in why the missing file could not be found since the task was looking in the source ("work/1/s") directory and the output parameter was sending it to the artifacts directory ("work/1/a").
I realized, though, that even when I had removed that parameter in order to do the binlog I still got the same error.
|
The difference is that the codesigning profile is an AdHoc profile, and that enters a different codepath during the build, which ends up failing. |
If I am following you, it is the "Codesign" task that was skipped due to the following false condition?
I'm curious why it would work in my local environment then since it would be using the same AdHoc profile? The Xamarin iOS version on my environment is 16.4.0.23. |
No, this is executed when it fails (and normally isn't executed): xamarin-macios/msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets Lines 534 to 541 in 2eccd88
Can you try adding this to your csproj to see if it works around the problem? <Target Name="InvokeTarget_CreateAssetPackManifest" DependsOnTargets="_CreateAssetPackManifest" AfterTargets="_CopyResourcesToBundle" /> if it doesn't, please attach an updated binlog. |
Note to self: I can reproduce using the iTravel submission sample with an AdHoc profile. |
…ixes xamarin#19669. We're calling the _CreateAssetPackManifest target during the build for legacy Xamarin apps, but somehow this seems to have been skipped over when implementing .NET support. The reason this has not showed up before is that it requires: * OnDemand resources. * An AdHoc provisioning profile (and a distribution certificate). The last part makes it rather complicated to write a unit test, so this has been verified manually. Fixes xamarin#19669.
…ixes #19669. (#19681) We're calling the _CreateAssetPackManifest target during the build for legacy Xamarin apps, but somehow this seems to have been skipped over when implementing .NET support. The reason this has not showed up before is that it requires: * OnDemand resources. * An AdHoc provisioning profile (and a distribution certificate). The last part makes it rather complicated to write a unit test, so this has been verified manually. Fixes #19669.
…ixes xamarin#19669. We're calling the _CreateAssetPackManifest target during the build for legacy Xamarin apps, but somehow this seems to have been skipped over when implementing .NET support. The reason this has not showed up before is that it requires: * OnDemand resources. * An AdHoc provisioning profile (and a distribution certificate). The last part makes it rather complicated to write a unit test, so this has been verified manually. Fixes xamarin#19669.
…uring the build. Fixes #19669. (#19714) We're calling the _CreateAssetPackManifest target during the build for legacy Xamarin apps, but somehow this seems to have been skipped over when implementing .NET support. The reason this has not showed up before is that it requires: * OnDemand resources. * An AdHoc provisioning profile (and a distribution certificate). The last part makes it rather complicated to write a unit test, so this has been verified manually. Fixes #19669. Backport of #19681
In a .Net Maui project that was migrated from Xamarin, I can run the exact same dotnet publish command on my local Mac and the command completes successfully but when I run the same publish command in Azure DevOps using the DotNetCLI@2 task then I get an error that it cannot find the AssetPackManifestTemplate.plist file during the execution of the WriteAssetPackManifest task.
Steps to Reproduce
Expected Behavior
UseDotNet@2 task completes successfully
Actual Behavior
error MSB4018: The "WriteAssetPackManifest" task failed unexpectedly.
error MSB4018: System.IO.FileNotFoundException: Could not find file '/Users/runner/work/1/s/Inform.Forms/obj/Test/net7.0-ios/ios-arm64/ipa/Payload/Inform.Forms.app/AssetPackManifestTemplate.plist'.
Environment
Pool: Azure Pipelines
Image: macos-13
Agent: Hosted Agent
Starting: Build iOS App
Task : .NET Core
Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command
Version : 2.221.0
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
/Users/runner/hostedtoolcache/dotnet/dotnet publish /Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj -c Test -f net7.0-ios -o /Users/runner/work/1/a -r ios-arm64 --self-contained
MSBuild version 17.7.3+4fca21998 for .NET
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: The "WriteAssetPackManifest" task failed unexpectedly. [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: System.IO.FileNotFoundException: Could not find file '/Users/runner/work/1/s/Inform.Forms/obj/Test/net7.0-ios/ios-arm64/ipa/Payload/Inform.Forms.app/AssetPackManifestTemplate.plist'. [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: File name: '/Users/runner/work/1/s/Inform.Forms/obj/Test/net7.0-ios/ios-arm64/ipa/Payload/Inform.Forms.app/AssetPackManifestTemplate.plist' [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError) [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func
4 createOpenException) [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios] /Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode) [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Xamarin.MacDev.PObject.FromFile(String fileName, Boolean& isBinary) in /Users/builder/azdo/_work/1/s/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/PListObject.cs:line 336 [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Xamarin.MacDev.PDictionary.FromFile(String fileName, Boolean& isBinary) in /Users/builder/azdo/_work/1/s/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/PListObject.cs:line 751 [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Xamarin.MacDev.PDictionary.FromFile(String fileName) in /Users/builder/azdo/_work/1/s/xamarin-macios/external/Xamarin.MacDev/Xamarin.MacDev/PListObject.cs:line 739 [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Xamarin.iOS.Tasks.WriteAssetPackManifestTaskBase.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Tasks/WriteAssetPackManifestTaskBase.cs:line 28 [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Xamarin.iOS.Tasks.WriteAssetPackManifest.Execute() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.iOS.Tasks/Tasks/WriteAssetPackManifest.cs:line 11 [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
/Users/runner/hostedtoolcache/dotnet/packs/Microsoft.iOS.Sdk/16.4.7129/tools/msbuild/iOS/Xamarin.iOS.Common.targets(534,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/runner/work/1/s/Inform.Forms/Inform.Forms.csproj::TargetFramework=net7.0-ios]
The text was updated successfully, but these errors were encountered: