Embeddinator-4000
Embeddinator-4000 copied to clipboard
objcgen - Failed to resolve assembly Xamarin.Essentials
Steps to Reproduce
- Create .NET Standard 2.0 project
- NuGet add dependency Xamarin.Essentials
- Create class that uses (not exposes) OrientationSensor class
- build assembly
- Run objcgen on assembly to build iOS framework
Expected Behavior
Generate a framework exposing the assembly classes (but not the ones in Xamarin.Essentials)
Actual Behavior
Get error stated in subject line
Environment
Mac Mini OSX 10.14.5 Visual Studio Community Mac 8.1.1 (build 27) Xcode Embeddinator 0.4.0
Build Logs
see attached build.log
Error:
Xamarin.iOS 12.10.0.157 (d16-1): 6bd94753) using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk
warning MT0136: Cannot find the assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '/Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll'.
warning MT0136: Cannot find the assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '/Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll'.
warning MT0030: The executable name (BankOnIt.Game.ObjC) and the app name (BankOnIt.Game.ObjC) are different, this may prevent crash logs from getting symbolicated properly.
error MT2002: Failed to resolve assembly: 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Two things:
- Could you attach a project showing the issue?
- Could you run the command in question:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --dev /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC --abi=armv7,armv7s,arm64 --sdkroot /Applications/Xcode.app --targetver 8.0 --dsym:false --msym:false --embeddinator /Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --sdk 12.2 --linksdkonly --xml=./Embed/bindings.xml --registrar:static --cache /Users/keith/Embed/iPhoneOS/build-cache --debug --assembly-build-target=@all=framework=BankOnIt.Game.ObjC.framework --target-framework Xamarin.iOS,v1.0 "--gcc_flags=-force_load /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC.a"
with an additional -r:<PATH_TO_Xamarin.Essentials.dll>?
Hey Chris, I'll put together a project shortly, however, I ran the command and the output it attached.
On Wed, 26 Jun 2019 at 01:30, Chris Hamons [email protected] wrote:
Error:
Xamarin.iOS 12.10.0.157 (d16-1): 6bd94753) using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk warning MT0136: Cannot find the assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '/Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll'. warning MT0136: Cannot find the assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '/Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll'. warning MT0030: The executable name (BankOnIt.Game.ObjC) and the app name (BankOnIt.Game.ObjC) are different, this may prevent crash logs from getting symbolicated properly. error MT2002: Failed to resolve assembly: 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Two things:
- Could you attach a project showing the issue?
- Could you run the command in question:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --dev /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC --abi=armv7,armv7s,arm64 --sdkroot /Applications/Xcode.app --targetver 8.0 --dsym:false --msym:false --embeddinator /Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --sdk 12.2 --linksdkonly --xml=./Embed/bindings.xml --registrar:static --cache /Users/keith/Embed/iPhoneOS/build-cache --debug --assembly-build-target=@all=framework=BankOnIt.Game.ObjC.framework --target-framework Xamarin.iOS,v1.0 "--gcc_flags=-force_load /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC.a"
with an additional -r:<PATH_TO_Xamarin.Essentials.dll>?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mono/Embeddinator-4000/issues/729?email_source=notifications&email_token=ACVMBXQGETE5VFB2ZGZ2KKLP4I223A5CNFSM4H3HFHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQUP6Y#issuecomment-505497595, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVMBXUDPQX6RVZLYS646ULP4I223ANCNFSM4H3HFHIA .
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --dev /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC --abi=armv7,armv7s,arm64 --sdkroot /Applications/Xcode.app --targetver 8.0 --dsym:false --msym:false --embeddinator /Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --sdk 12.2 --linksdkonly --xml=./Embed/bindings.xml --registrar:static --cache /Users/keith/Embed/iPhoneOS/build-cache --debug --assembly-build-target=@all=framework=BankOnIt.Game.Obj.framework --target-framework Xamarin.iOS,v1.0 "--gcc_flags=-force_load /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC.a" -r:/Users/keith/Projects/bank-on-it-mobile/Source/packages/Xamarin.Essentials.1.1.0/lib/netstandard2.0/Xamarin.Essentials.dll
Xamarin.iOS 12.10.0.157 (d16-1): 6bd94753) using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk
warning MT0030: The executable name (BankOnIt.Game.ObjC) and the app name (BankOnIt.Game.ObjC) are different, this may prevent crash logs from getting symbolicated properly.
error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.ArgumentNullException: Value cannot be null.
Parameter name: collection
at System.Collections.Generic.List1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable
1[T] collection) [0x00003] in 1[T].AddRange (System.Collections.Generic.IEnumerable
1[T] collection) [0x00000] in 1[T].ForEach (System.Action
1[T] action) [0x0001e] in
see attached sample project.
On Thu, 27 Jun 2019 at 21:01, Keith Moore [email protected] wrote:
Hey Chris, I'll put together a project shortly, however, I ran the command and the output it attached.
On Wed, 26 Jun 2019 at 01:30, Chris Hamons [email protected] wrote:
Error:
Xamarin.iOS 12.10.0.157 (d16-1): 6bd94753) using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk warning MT0136: Cannot find the assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '/Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll'. warning MT0136: Cannot find the assembly 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' referenced from '/Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll'. warning MT0030: The executable name (BankOnIt.Game.ObjC) and the app name (BankOnIt.Game.ObjC) are different, this may prevent crash logs from getting symbolicated properly. error MT2002: Failed to resolve assembly: 'Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
Two things:
- Could you attach a project showing the issue?
- Could you run the command in question:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --dev /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC --abi=armv7,armv7s,arm64 --sdkroot /Applications/Xcode.app --targetver 8.0 --dsym:false --msym:false --embeddinator /Users/keith/Projects/bank-on-it-mobile/Source/Output/Debug/ObjC/netstandard2.0/BankOnIt.Game.ObjC.dll -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll --sdk 12.2 --linksdkonly --xml=./Embed/bindings.xml --registrar:static --cache /Users/keith/Embed/iPhoneOS/build-cache --debug --assembly-build-target=@all=framework=BankOnIt.Game.ObjC.framework --target-framework Xamarin.iOS,v1.0 "--gcc_flags=-force_load /Users/keith/Embed/iPhoneOS/BankOnIt.Game.ObjC.a"
with an additional -r:<PATH_TO_Xamarin.Essentials.dll>?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mono/Embeddinator-4000/issues/729?email_source=notifications&email_token=ACVMBXQGETE5VFB2ZGZ2KKLP4I223A5CNFSM4H3HFHIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQUP6Y#issuecomment-505497595, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVMBXUDPQX6RVZLYS646ULP4I223ANCNFSM4H3HFHIA .