xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.49k stars 515 forks source link

Maui failed to reference ios binding library #16192

Open jfversluis opened 2 years ago

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @wzh425 on Tuesday, September 27, 2022 1:34:05 PM

Description

截屏2022-09-27 20 54 53

Steps to Reproduce

  1. Create ios binding library to bind WeChatSDK and compile successfully.
  2. The binding library is referenced in the maui project but cannot be generated

IOS.WeChat.csproj 截屏2022-09-27 21 06 53

Link to public reproduction project repository

https://github.com/wzh425/MauiBlazorDemo

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

ios15.4

Did you find any workaround?

No response

Relevant log output

目标 _LinkNativeExecutable:
        Tool xcrun execution started with arguments: clang++ -F /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo -framework CFNetwork -F /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo -framework CoreTelephony -F /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo -framework Security -F /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo -framework SystemConfiguration -force_load /Users/kakuhiroshi/Projects/MauiBlazorDemo/IOS.WeChat/bin/Debug/net6.0-ios/IOS.WeChat.dll -ObjC -all_load -lstdc++ -lsqlite3.0 -lz -mios-version-min=14.2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.0.sdk -arch arm64 /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo/obj/Debug/net6.0-ios/ios-arm64/nativelibraries/aot-output/arm64/System.Private.CoreLib.dll.o /usr/local/share/dotnet/packs/Microsoft.iOS.Runtime.ios-arm64/15.4.442/runtimes/ios-arm64/native/libxamarin-dotnet-debug.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libSystem.IO.Compression.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libSystem.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libSystem.Net.Security.Native.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libSystem.Security.Cryptography.Native.Apple.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libicudata.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libicui18n.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libicuuc.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmono-component-debugger-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmono-component-diagnostics_tracing-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmono-component-hot_reload-stub-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmonosgen-2.0.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmono-component-debugger-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmono-component-diagnostics_tracing-static.a /usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.5/runtimes/ios-arm64/native/libmono-component-hot_reload-stub-static.a -force_load /Users/kakuhiroshi/Projects/MauiBlazorDemo/IOS.WeChat/bin/Debug/net6.0-ios/IOS.WeChat.resources/libWeChatSDK.a -framework AuthenticationServices -framework CFNetwork -framework CloudKit -framework Contacts -framework ContactsUI -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework CoreTelephony -framework CoreText -framework Foundation -framework Intents -framework MediaPlayer -framework QuartzCore -framework SafariServices -framework Security -framework SystemConfiguration -framework UIKit -framework WebKit -framework GSS -framework CFNetwork -framework CFNetwork -framework CoreTelephony -framework Security -framework SystemConfiguration -rpath @executable_path/Frameworks /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo/obj/Debug/net6.0-ios/ios-arm64/nativelibraries/main.arm64.o /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo/obj/Debug/net6.0-ios/ios-arm64/nativelibraries/registrar.o -o /Users/kakuhiroshi/Projects/MauiBlazorDemo/MauiBlazorDemo/obj/Debug/net6.0-ios/ios-arm64/nativelibraries/MauiBlazorDemo -ObjC -all_load -lstdc++ -lsqlite3.0 -lz -dead_strip -u_SystemNative_Log -u_SystemNative_GetEnv -u_SystemNative_SearchPath_TempDirectory -u_SystemNative_ConvertErrorPlatformToPal -u_SystemNative_ConvertErrorPalToPlatform -u_SystemNative_StrErrorR -u_SystemNative_Close -u_SystemNative_GetFileSystemType -u_SystemNative_FLock -u_SystemNative_FSync -u_SystemNative_FTruncate -u_SystemNative_GetCpuUtilization -u_SystemNative_GetCwd -u_SystemNative_GetEGid -u_SystemNative_GetNonCryptographicallySecureRandomBytes -u_SystemNative_GetCryptographicallySecureRandomBytes -u_SystemNative_GetSystemTimeAsTicks -u_SystemNative_GetTimestamp -u_SystemNative_LowLevelMonitor_Create -u_SystemNative_LowLevelMonitor_Destroy -u_SystemNative_LowLevelMonitor_Acquire -u_SystemNative_LowLevelMonitor_Release -u_SystemNative_LowLevelMonitor_Wait -u_SystemNative_LowLevelMonitor_TimedWait -u_SystemNative_LowLevelMonitor_Signal_Release -u_SystemNative_LSeek -u_SystemNative_Free -u_SystemNative_Malloc -u_SystemNative_MkDir -u_SystemNative_MksTemps -u_SystemNative_Open -u_SystemNative_PosixFAdvise -u_SystemNative_FAllocate -u_SystemNative_PRead -u_SystemNative_PReadV -u_SystemNative_PWrite -u_SystemNative_PWriteV -u_SystemNative_Read -u_SystemNative_OpenDir -u_SystemNative_GetReadDirRBufferSize -u_SystemNative_ReadDirR -u_SystemNative_CloseDir -u_SystemNative_ReadLink -u_SystemNative_FStat -u_SystemNative_Stat -u_SystemNative_LStat -u_SystemNative_SysLog -u_SystemNative_Unlink -u_SystemNative_Write -u_SystemNative_GetEUid -u_SystemNative_CreateAutoreleasePool -u_SystemNative_DrainAutoreleasePool -u_xamarin_release_managed_ref -u_xamarin_set_gchandle_with_flags_safe -u_UIApplicationMain -u_xamarin_find_protocol_wrapper_type -u_xamarin_log -u_xamarin_release_block_on_main_thread -u_xamarin_get_block_descriptor -u_xamarin_NativeHandle_objc_msgSend_NativeHandle_exception -u_xamarin_NativeHandle_objc_msgSendSuper_NativeHandle_exception -lz -liconv -lcompression

        Tool xcrun execution finished (exit code = 1).

        ld: warning: ignoring file /Users/kakuhiroshi/Projects/MauiBlazorDemo/IOS.WeChat/bin/Debug/net6.0-ios/IOS.WeChat.dll, building for iOS-arm64 but attempting to link with file built for unknown-unsupported file format ( 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0xFF 0xFF 0x00 0x00 )
        Undefined symbols for architecture arm64:
          "_OBJC_CLASS_$_HBReq", referenced from:
              objc-class-ref in registrar.o
          "_OBJC_CLASS_$_HBResp", referenced from:
              objc-class-ref in registrar.o
          "_OBJC_CLASS_$_JumpToBizProfileReq", referenced from:
              objc-class-ref in registrar.o
          "_OBJC_CLASS_$_JumpToBizWebviewReq", referenced from:
              objc-class-ref in registrar.o
          "_OBJC_CLASS_$_OpenTempSessionReq", referenced from:
              objc-class-ref in registrar.o
          "_OBJC_CLASS_$_OpenTempSessionResp", referenced from:
              objc-class-ref in registrar.o
        ld: symbol(s) not found for architecture arm64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)

        /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.442/targets/Xamarin.Shared.Sdk.targets(1219,3): error : clang++ exited with code 1
        /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/15.4.442/targets/Xamarin.Shared.Sdk.targets(1219,3): error :         
    已完成在项目“MauiBlazorDemo.csproj”中生成目标“_LinkNativeExecutable”的操作 - 失败。
jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @PureWeen on Tuesday, September 27, 2022 6:12:04 PM

@rolfbjarne thoughts?

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @wzh425 on Wednesday, September 28, 2022 4:04:30 AM

Hope to get your response

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @rolfbjarne on Wednesday, September 28, 2022 5:21:26 AM

The problem is that the libWeChatSDK.a file doesn't contain the classes you're trying to bind.

For exampe HBReq, it's in your binding:

git grep HBReq
IOS.WeChat/ApiDefinition.cs:    // @interface HBReq : BaseReq
IOS.WeChat/ApiDefinition.cs:    interface HBReq

but it's not in libWeChatSDK.a:

$ nm ./IOS.WeChat/libWeChatSDK.a | grep HBReq
<no output>

thus the build fails, because it tries to find the native HBReq class when it doesn't exist.

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @wzh425 on Wednesday, September 28, 2022 5:36:54 AM

@rolfbjarne I have handled this error and successfully compiled, but new problems have arisen。

The project successfully generated the assembly of the binding library, but I couldn't call it, and I couldn't find the class and namespace 截屏2022-09-28 13 30 29 截屏2022-09-28 13 29 55

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @rolfbjarne on Wednesday, September 28, 2022 6:18:27 AM

That's a known problem for intellisense. It should work once you actually build the project.

A workaround is to reference the binding assembly, not the binding project, from the main project.

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @wzh425 on Wednesday, September 28, 2022 6:55:07 AM

@rolfbjarne Thank you very much for your reply。 I'm sorry to have a new problem。 An error occurred when I connected to the local IOS mobile phone for debugging:ould not load the framework 'DVTITunesSoftwareServiceFoundation' 截屏2022-09-28 14 55 27

jfversluis commented 2 years ago

Issue moved from dotnet/maui#10344


From @mattleibow on Wednesday, September 28, 2022 6:12:24 PM

May be related to https://github.com/dotnet/maui/issues/10377

tj-devel709 commented 2 years ago

@wzh425 what version of Xcode do you have installed? If you have Xcode14 installed, you will need to be using xamarin.ios 16.0.*. A more stable option would be to make sure you are using Xcode 13.4.1 instead.

ghost commented 2 years ago

Hi @jfversluis. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

wzh425 commented 2 years ago

@tj-devel709 Yes, I installed Xcode14

mlancione commented 2 years ago

I'm running into this issue as well in a Maui project when adding a native reference to a static library (libveldrid-spirv from https://github.com/mellinoe/veldrid-spirv).

The issue exists using either xcode 13 or 14.

rolfbjarne commented 2 years ago

@wzh425:

@rolfbjarne Thank you very much for your reply。 I'm sorry to have a new problem。 An error occurred when I connected to the local IOS mobile phone for debugging:ould not load the framework 'DVTITunesSoftwareServiceFoundation' 截屏2022-09-28 14 55 27

That's described here: https://github.com/xamarin/xamarin-macios/issues/16164

rolfbjarne commented 2 years ago

I'm running into this issue as well in a Maui project when adding a native reference to a static library (libveldrid-spirv from mellinoe/veldrid-spirv).

The issue exists using either xcode 13 or 14.

Please create a new issue (since it might be a different problem than the one described here), and attach a test project we can use to reproduce the problem.

mdima commented 2 years ago

Hello, the same happens in Xamarin.Forms.

The binding library is referenced in the project (as Project Reference), but it is totally empty in the Class View. The iOS project do not compile.

If the same binding library is referenced from a local .nuget package there are no problems.

Thanks, Mdm

icalderond commented 2 years ago

@wzh425:

@rolfbjarne Thank you very much for your reply。 I'm sorry to have a new problem。 An error occurred when I connected to the local IOS mobile phone for debugging:ould not load the framework 'DVTITunesSoftwareServiceFoundation' 截屏2022-09-28 14 55 27

That's described here: #16164

I had this problem before and the way to fix it is install Command_Line_Tools_for_Xcode_14.dmg. Please check if this installation fix your problem.

tj-devel709 commented 2 years ago

Hello, the same happens in Xamarin.Forms.

The binding library is referenced in the project (as Project Reference), but it is totally empty in the Class View. The iOS project do not compile.

If the same binding library is referenced from a local .nuget package there are no problems.

Thanks, Mdm

Please create a new issue for this problem as the reason could be different than this one. Also please attach a test project so that we can reproduce the issue.

tj-devel709 commented 2 years ago

@wzh425 Please let us know if Rolf's suggestion fixed the issue for you.

ghost commented 2 years ago

Hi @jfversluis. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

mdima commented 2 years ago

Hello, the same happens in Xamarin.Forms. The binding library is referenced in the project (as Project Reference), but it is totally empty in the Class View. The iOS project do not compile. If the same binding library is referenced from a local .nuget package there are no problems. Thanks, Mdm

Please create a new issue for this problem as the reason could be different than this one. Also please attach a test project so that we can reproduce the issue.

I created this issue: https://github.com/xamarin/xamarin-macios/issues/16299

Thanks, Mdm

mdima commented 2 years ago

Hello, I hit the same issue on another project, this time based on MAUI. In this new project the error is:

4>ld: file not found: /Users/michele/Library/Caches/Xamarin/mtbs/builds/DemoAppNET6/0ff5c9bcf3f669801e840ff76bd0407cf894b0e3e3c5ff0e8e3e3d6783cbbaa8/obj/Debug/net6.0-ios/ios-arm64/linker-cache/libLibHealthCombine_4.1.a

The problem does not solve adding the binding library to the project nor the binding project.

I can provide more documentation if needed.

Thanks, Mdm

rolfbjarne commented 2 years ago

@mdima does it work if you build using Visual Studio on the Mac?

mdima commented 2 years ago

@mdima does it work if you build using Visual Studio on the Mac?

Hi @rolfbjarne , unfortunately no, it doesn't compile on Visual Studio on Mac.

The error is the same: /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error : ld: file not found: /Users/michele/Desktop/LinkTopLibrary NET6/Demo App NET6/obj/Debug/net6.0-ios/ios-arm64/linker-cache/libLibHealthCombine_4.1.a

Few lines before I read (both on Windows than on Mac, anyway this log is from the Mac): ILLINK : warning MT1302: Could not extract the native library 'libLibHealthCombine_4.1.a' from '/Users/michele/Desktop/LinkTopLibrary NET6/Demo App NET6/obj/Debug/net6.0-ios/ios-arm64/linker-cache/libLibHealthCombine_4.1.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').

so I invented to add manually in the project file:

        <ItemGroup>
      <ObjcBindingNativeLibrary Include="Platforms\iOS\libLibHealthCombine_4.1.a">
        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        <Bind></Bind>
        <Pack></Pack>
      </ObjcBindingNativeLibrary>
    </ItemGroup>

But when I compile the error is the same.

Thanks, Michele

rolfbjarne commented 2 years ago

@mdima could you get a binlog of the failing build?

mdima commented 2 years ago

@rolfbjarne Here you are.

msbuild.binlog.zip

rolfbjarne commented 2 years ago

@mdima that binlog shows a different error:

Errors
    C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\App.xaml.cs(5,26): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'LinkTopLibrary' (are you missing an assembly reference?) [C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Demo App NET6.csproj]
    C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\MainPage.xaml.cs(5,26): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'LinkTopLibrary' (are you missing an assembly reference?) [C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Demo App NET6.csproj]
    C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\MauiProgram.cs(7,26): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'LinkTopLibrary' (are you missing an assembly reference?) [C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Demo App NET6.csproj]
    C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Pages\BodyTemperature.xaml.cs(5,26): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'LinkTopLibrary' (are you missing an assembly reference?) [C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Demo App NET6.csproj]
    C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Pages\Welcome.xaml.cs(5,26): error CS0234: The type or namespace name 'iOS' does not exist in the namespace 'LinkTopLibrary' (are you missing an assembly reference?) [C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\Demo App NET6\Demo App NET6.csproj]

and not the one you mention here: https://github.com/xamarin/xamarin-macios/issues/16192#issuecomment-1293208994

mdima commented 2 years ago

@rolfbjarne yes... the problem is before, in the cross-platform library I realized that contains a common interface for both platforms.

The library compiles without errors (even if IntelliSense shows as errors the references to the native library objects). Unfortunately it seems that all what is inside the libLibHealthCombine_4.1.a library is not considered at all. Inside that library I added a direct reference to the native library, but did not help.

rolfbjarne commented 2 years ago

@mdima I'm not sure I understand what's going on.

In order to figure out what's causing this error:

error : ld: file not found: ...

I need a binlog that shows that error.

mdima commented 2 years ago

@rolfbjarne it seems like a "chicken in the egg" situation, because I can't arrive to that point, it seems that if fails before.

Maybe what I can do is to provide the binlogs of: 1) The native library (LinkTopSDK.iOS.binlog) 2) The cross platform library (LinkTopLibrary.binlog)

The native library is in the file libLibHealthCombine_4.1.a . Do you have any evidence of the reason why the objects and functions inside the native library are not available in the Maui App (which references the cross platform library project)?

Thanks, Michele

LinkTopSDK.iOS.binlog.zip

LinkTopLibrary.binlog.zip

rolfbjarne commented 2 years ago

@mdima you must connect to a Mac in order to build a binding project from Windows.

mdima commented 2 years ago

mmmhhh... it was... to double check I rebuilt the native library. Below the build log and the binlog.

1>------ Rebuild All started: Project: LinkTopSDK.iOS, Configuration: Debug Any CPU ------
1>Executing SayHello Task to establish a connection to a Remote Server. 
1>          Properties: 
1>              SessionId=ae8bd6c03c291cffebd2662248aad7c62dfc630a8dc9fae97cde8edd7052d671, 
1>              Addresss=192.168.234.128, 
1>              SshPort=22, 
1>              TcpPort=59225, 
1>              User=michele, 
1>              AppName=LinkTopSDK.iOS,
1>              VisualStudioProcessId=4700,
1>              ContinueOnDisconnected=False
1>/Users/michele/Library/Caches/Xamarin/XMA/SDKs/dotnet/dotnet /Users/michele/Library/Caches/Xamarin/XMA/SDKs/dotnet/packs/Microsoft.iOS.Sdk/16.0.517/tools/lib/bgen/bgen.dll @/Users/michele/Library/Caches/Xamarin/mtbs/builds/LinkTopSDK.iOS/ae8bd6c03c291cffebd2662248aad7c62dfc630a8dc9fae97cde8edd7052d671/obj/Debug/net6.0-ios/response-file.rsp
1>LinkTopSDK.iOS -> C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\LinkTopSDK.iOS\bin\Debug\net6.0-ios\LinkTopSDK.iOS.dll
1>Successfully created package 'C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\LinkTopSDK.iOS\bin\Debug\LinkTopSDK.iOS.1.0.0.nupkg'.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

msbuild.binlog.zip

If in the binlog there's no track of the connection to the Mac probably there's a problem above all...

Thanks, Michele

mdima commented 2 years ago

PS: the same library compiles OK as native library using Xamarin Forms. The problem is with the NET6 version of the package.

rolfbjarne commented 2 years ago

This is from the binlog:

>Target "_SayHello: (TargetId:26)" in file "C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\16.0.517\tools\msbuild\iOS\Xamarin.Messaging.Build.targets" from project "C:\Users\Michele DM\source\repos\LinkTopLibrary NET6\LinkTopSDK.iOS\LinkTopSDK.iOS.csproj" (target "Build" depends on it):
                   Set Property: ServerSshPort=22
                   Set Property: GenerateCache=false
                   Set Property: ContinueOnDisconnected=true
                   Task "Warning" skipped, due to false condition; ('$(ServerPort)' != '') was evaluated as ('' != '').
                   Task "Message" skipped, due to false condition; ('$(ServerAddress)' != '') was evaluated as ('' != '').
                   Task "SayHello" skipped, due to false condition; ('$(ServerAddress)' != '') was evaluated as ('' != '').

are you posting a binlog from a different build?

mdima commented 2 years ago

Hi @rolfbjarne , yes, two different builds just made one right after the other to show the difference between compiling from the interface and compiling from the development powershell...

rolfbjarne commented 2 years ago

@mdima can you get a binlog from a failing build from Visual Studio for Mac (that way we avoid any issues related to being connected to the Mac from Windows)?

mdima commented 2 years ago

@rolfbjarne I was trying to sort out this problem since this morning, but I did not get to any reasonable result.

In Visual Studio for Mac the Native Library project compiles successfully, but I encountered issues compiling the "cross platform library". In the while in Visual Studio per Windows I was able to get a significant size of the Nuget Package including in the Native Library project the line. Unfortunately anyway for the ARM64 architecture the application doesn't compile.

What do you think if I send you in pvt the project I am working on?

Thanks, Michele

rolfbjarne commented 2 years ago

@mdima yes, please, file a new issue and attach your project so that we can look at it.

jingliancui commented 2 years ago

https://github.com/xamarin/xamarin-macios/issues/16953

hope this will help you