Skip to content

Binding project failing with "The 'CreateBindingResourcePackage' task failed unexpectedly." #23003

Closed
@sethom

Description

@sethom

Apple platform

iOS

Framework version

net9.0-*

Affected platform version

VS 2022 17.14.4, NET 9.0.300

Description

This is a continuation of issue #22945. It was closed out before I got a chance to provide additional info.

I feel that there is probably something wrong in my environment but cannot find it. (I have listed the details of my installation below)

Whenever pair-to-mac is active, it fails with "CreateBindingResourcePage" and I do not get a .dll in the bin folder. An AudioKitFrameworkProxyCore.Binding.dll only got created when "Pair-to-mac" was off (I didn't realize this is what had happened when I created #22945). Of course the dll is empty and is only 15 KB in size.

When Pair-to-Mac is active, the build fails with the message below. This doesn't make sense because the file it's looking for "arm64-apple-ios.swiftdoc" I believe is supposed to be created during the build process (note: I can create a basic MAUI app project from the template, build it and run it from the same Mac.):

The "CreateBindingResourcePackage" task failed unexpectedly. System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\xxx\source\repos\ETUCurrent_Maui\ETUCurrent_Maui\AudioKitFrameworkProxyCore.Binding\bin\Release\net9.0-ios18.4\AudioKitFrameworkProxyCore.Binding.resources\AudioKitFrameworkProxy.framework\Modules\AudioKitFrameworkProxy.swiftmodule\arm64-apple-ios.swiftdoc'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.IO.File.Create(String path) at Xamarin.Messaging.Ssh.MessagingFileManager.<DownloadFileAsync>d__15.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 204 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Ssh.MessagingFileManager.<DownloadFileAsync>d__17.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 248 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Build.Client.BuildClient.<RunFileManagerAsync>d__35.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\BuildClient.cs:line 408 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Build.Client.BuildClient.<DownloadItemAsync>d__25.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\BuildClient.cs:line 229 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Build.Client.TaskRunner.<GetFileAsync>d__11.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\TaskRunner.cs:line 269 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Xamarin.Messaging.Build.Client.TaskRunner.<GetFileAsync>d__11.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\TaskRunner.cs:line 273 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Xamarin.MacDev.Tasks.CreateBindingResourcePackage.<TransferBindingResourcePackagesToWindowsAsync>d__28.MoveNext() in /Users/builder/azdo/_work/7/s/macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackage.cs:line 201 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Xamarin.MacDev.Tasks.CreateBindingResourcePackage.Execute() in /Users/builder/azdo/_work/7/s/macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackage.cs:line 45 at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() ---> (Inner Exception #0) System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\xxx\source\repos\ETUCurrent_Maui\ETUCurrent_Maui\AudioKitFrameworkProxyCore.Binding\bin\Release\net9.0-ios18.4\AudioKitFrameworkProxyCore.Binding.resources\AudioKitFrameworkProxy.framework\Modules\AudioKitFrameworkProxy.swiftmodule\arm64-apple-ios.swiftdoc'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.IO.File.Create(String path) at Xamarin.Messaging.Ssh.MessagingFileManager.<DownloadFileAsync>d__15.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 204 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Ssh.MessagingFileManager.<DownloadFileAsync>d__17.MoveNext() in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 248 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Build.Client.BuildClient.<RunFileManagerAsync>d__35.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\BuildClient.cs:line 408 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Build.Client.BuildClient.<DownloadItemAsync>d__25.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\BuildClient.cs:line 229 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Xamarin.Messaging.Build.Client.TaskRunner.<GetFileAsync>d__11.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\TaskRunner.cs:line 269 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Xamarin.Messaging.Build.Client.TaskRunner.<GetFileAsync>d__11.MoveNext() in D:\a\_work\1\s\src\MSBuild\Xamarin.Messaging.Build.Client\TaskRunner.cs:line 273 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Xamarin.MacDev.Tasks.CreateBindingResourcePackage.<TransferBindingResourcePackagesToWindowsAsync>d__28.MoveNext() in /Users/builder/azdo/_work/7/s/macios/msbuild/Xamarin.MacDev.Tasks/Tasks/CreateBindingResourcePackage.cs:line 201<---

Here are the things I've installed on my Mac:

Xcode 16.3
6.12.0 Mono
Xamarin iOS Version 16.4.0.23
Here are the .net versions installed:

dotnet --list-sdks
6.0.422 [/usr/local/share/dotnet/sdk]
7.0.316 [/usr/local/share/dotnet/sdk]
8.0.409 [/usr/local/share/dotnet/sdk]
9.0.300 [/usr/local/share/dotnet/sdk]

 dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.16 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.30 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Am I missing something in my setup or are there some incompatibilities with what I'm using?

Steps to Reproduce

Create a binding project and build against the same runtimes/sdks listed above.

Did you find any workaround?

No response

Build logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    binding-projectsIssue or PR that affects binding projectsneed-infoWaiting for more information before the bug can be investigated

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions