Skip to content
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

Build error: xcframework has an incorrect or unknown format and cannot be processed #13602

Closed
lassana opened this issue Dec 19, 2021 · 1 comment

Comments

@lassana
Copy link

lassana commented Dec 19, 2021

Steps to Reproduce

  1. Download the attached solution and extract it
  2. Run msbuild UniversalBinding/UniversalBinding.csproj /p:Configuration=Release
  3. Run nuget pack UniversalBinding.nuspec
  4. Copy UniversalBinding.1.0.0-pre01.nupkg into your local Nuget feed. It will be needed later.
  5. Open the solution in VS for Mac.
  6. Build and run BindingTestApp. It includes UniversalBinding directly as a project reference and correctly invokes code from the xcframework. So far so good.
  7. Now try to build and run BindingNugetTestApp. It references UniversalBinding as a Nuget package and the build fails with: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(3,3): Error: /Users/user/Desktop/BindingTest/BindingNugetTestApp/bin/iPhoneSimulator/Debug/UniversalBinding.resources/UniversalBinding.xcframework has an incorrect or unknown format and cannot be processed.

The bug potentially relates to #10046, #10774, #10784, #12087

Expected Behavior

XCFramework can be used from a Nuget package.

Actual Behavior

Build error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(3,3): Error: /Users/user/Desktop/BindingTest/BindingNugetTestApp/bin/iPhoneSimulator/Debug/UniversalBinding.resources/UniversalBinding.xcframework has an incorrect or unknown format and cannot be processed.

Environment

About Microsoft Visual Studio
=== Visual Studio Community 2019 for Mac ===

Version 8.10.15 (build 32)
Installation UUID: 3fa90cee-79c4-4b50-93fb-cfc2f09b209a
	GTK+ 2.24.23 (Raleigh theme)
	Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

	Package version: 612000162

=== Mono Framework MDK ===

Runtime:
	Mono 6.12.0.162 (2020-02/2ca650f1f62) (64-bit)
	Package version: 612000162

=== Roslyn (Language Service) ===

3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb

=== NuGet ===

Version: 5.9.0.7134

=== .NET SDK (x64) ===

SDK: /usr/local/share/dotnet/sdk/6.0.101/Sdks
SDK Version: 6.0.101
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 6.0.1

=== .NET Core 3.1 SDK ===

SDK: Not installed

=== .NET 5.0 SDK ===

SDK: Not installed

=== Xamarin.Profiler ===

Version: 1.6.12.26
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 13.2.1 (19586)
Build 13C100

=== Xamarin.Mac ===

Xamarin.Mac not installed. Can't find /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version.

=== Xamarin.Android ===

Version: 12.0.0.3 (Visual Studio Community)
Commit: xamarin-android/d16-11/f0e3c2d
Android SDK: /usr/local/share/android-sdk/
	Supported Android versions:
		8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 31.0.3
SDK Build Tools Version: 31.0.0 rc3

Build Information: 
Mono: c633fe9
Java.Interop: xamarin/java.interop/d16-11@476bb5b
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.35.4@85460d3
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-11@87af37b

=== Eclipse Temurin JDK ===

Java SDK: Not Found

=== Android SDK Manager ===

Version: 16.10.0.13
Hash: 1b81df5
Branch: remotes/origin/d16-10
Build date: 2021-11-12 01:17:32 UTC

=== Android Device Manager ===

Version: 16.10.0.15
Hash: 89dcc0b
Branch: remotes/origin/d16-10
Build date: 2021-11-12 01:17:52 UTC

=== Xamarin Designer ===

Version: 16.11.0.39
Hash: cd672761d
Branch: remotes/origin/d16-11
Build date: 2021-10-06 21:09:18 UTC

=== Xamarin.iOS ===

Version: 15.4.0.0 (Visual Studio Community)
Hash: 8fc41ae82
Branch: xcode13.2
Build date: 2021-12-09 01:07:56-0500

=== Build Information ===

Release ID: 810150032
Git revision: 58596ba3d9a5b886d18f5e821410018394ff0d4e
Build date: 2021-12-09 06:54:15-05
Build branch: release-8.10

=== Operating System ===

Mac OS X 11.6.1
Darwin 20.6.0 Darwin Kernel Version 20.6.0
    Tue Oct 12 18:33:42 PDT 2021
    root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

DeepClean 1.2.5
AddinMaker 1.6.0
Eto.Forms Support Addin 2.5.6
NuGet Package Explorer 0.6


Build Logs

Example Project (If Possible)

BindingTest.zip

@lassana
Copy link
Author

lassana commented Dec 19, 2021

My bad. The msbuild targets file contained wrong paths.

@lassana lassana closed this as completed Dec 19, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant