Xamarin iOS Building Error: Unpack local framework faild

Xamarin iOS Building Error: Unpack local framework faild

我想建立一个很久没用过的项目。更新所有可能的 nuget 包并尝试自行修复大部分错误后,我得到以下输出:


2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277: Found conflicts between different versions of "System.Buffers" that could not be resolved.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277: There was a conflict between "System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" and "System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51".
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:     "System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" was chosen because it was primary and "System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" was not.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:     References which depend on "System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" [C:\Users\CRoeder\.nuget\packages\system.buffers.5.1\ref\netstandard2.0\System.Buffers.dll].
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:         C:\Users\CRoeder\.nuget\packages\system.buffers.5.1\ref\netstandard2.0\System.Buffers.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\CRoeder\.nuget\packages\system.buffers.5.1\ref\netstandard2.0\System.Buffers.dll".
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\.nuget\packages\system.buffers.5.1\ref\netstandard2.0\System.Buffers.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:     References which depend on "System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" [].
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:         C:\Users\CRoeder\.nuget\packages\system.memory.5.4\lib\netstandard2.0\System.Memory.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:           Project file item includes which caused reference "C:\Users\CRoeder\.nuget\packages\system.memory.5.4\lib\netstandard2.0\System.Memory.dll".
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\.nuget\packages\system.memory.5.4\lib\netstandard2.0\System.Memory.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\.nuget\packages\sqlite-net-pcl.7.335\lib\netstandard2.0\SQLite-net.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\source\repos\PLUTester\PLUTester\PLUTester\bin\Debug\netstandard2.0\PLUTester.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\.nuget\packages\sqlitepclraw.core.0.3\lib\netstandard2.0\SQLitePCLRaw.core.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\.nuget\packages\sqlitepclraw.bundle_green.0.3\lib\Xamarin.iOS10\SQLitePCLRaw.batteries_v2.dll
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2182,5): warning MSB3277:             C:\Users\CRoeder\.nuget\packages\sqlitepclraw.provider.dynamic_cdecl.0.3\lib\netstandard2.0\SQLitePCLRaw.provider.dynamic_cdecl.dll
2>  Consider app.config remapping of assembly "System.Runtime.CompilerServices.Unsafe, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.6.0" [] to Version "5.0.0.0" [C:\Users\CRoeder\.nuget\packages\system.runtime.compilerservices.unsafe.0.0\ref\netstandard2.1\System.Runtime.CompilerServices.Unsafe.dll] to solve conflict and get rid of warning.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2298,5): warning MSB3836: The explicit binding redirect on "System.Runtime.CompilerServices.Unsafe, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" conflicts with an autogenerated binding redirect. Consider removing it from the application configuration file or disabling autogenerated binding redirects. The build will replace it with: "<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" xmlns="urn:schemas-microsoft-com:asm.v1" />".
2>  PLUTester.iOS -> C:\Users\CRoeder\source\repos\PLUTester\PLUTester\PLUTester.iOS\bin\iPhone\Debug\PLUTester.iOS.exe
2>  Detected signing identity:
2>          
2>    Code Signing Key: *****
2>    Provisioning Profile: *****
2>    Bundle Id: *****
2>    App Id: *****
2>  /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch @/Users/tnd-it/Library/Caches/Xamarin/mtbs/builds/PLUTester.iOS/2baa4fd2be2e05bc09a85ce9bdd5b7fabb67cd3865a973e98aab3f8045e055d9/obj/iPhone/Debug/response-file.rsp -v "--gcc_flags=-ObjC -lsqlite3 -LC:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries -lGoogleAnalytics -force_load C:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries/libGoogleAnalytics.a -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -ObjC -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -LC:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries -lGoogleAnalytics -force_load C:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries/libGoogleAnalytics.a -ObjC -lz -lsqlite3" 
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: GTMAppAuthFetcherAuthorization. The symbol '_OBJC_CLASS_$_GTMAppAuthFetcherAuthorization' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: GTMKeychain. The symbol '_OBJC_CLASS_$_GTMKeychain' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: GTMOAuth2KeychainCompatibility. The symbol '_OBJC_CLASS_$_GTMOAuth2KeychainCompatibility' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: OIDAuthState. The symbol '_OBJC_CLASS_$_OIDAuthState' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: OIDAuthorizationRequest. The symbol '_OBJC_CLASS_$_OIDAuthorizationRequest' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: OIDAuthorizationService. The symbol '_OBJC_CLASS_$_OIDAuthorizationService' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: OIDIDToken. The symbol '_OBJC_CLASS_$_OIDIDToken' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: OIDServiceConfiguration. The symbol '_OBJC_CLASS_$_OIDServiceConfiguration' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5211: Native linking failed, undefined Objective-C class: OIDURLQueryComponent. The symbol '_OBJC_CLASS_$_OIDURLQueryComponent' could not be found in any of the libraries or frameworks linked with your application.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5210: Native linking failed, undefined symbol: _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorization. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5210: Native linking failed, undefined symbol: _OIDOAuthErrorResponseErrorKey. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5210: Native linking failed, undefined symbol: _OIDOAuthTokenErrorDomain. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5210: Native linking failed, undefined symbol: _OIDResponseTypeCode. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'System' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'System.Net.Security' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'Kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'libEGL' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'dl' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): warning MT5215: References to 'kernel32' might require additional -framework=XXX or -lXXX instructions to the native linker
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -ObjC -lsqlite3 -LC:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries -lGoogleAnalytics -force_load C:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries/libGoogleAnalytics.a -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -ObjC -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -ObjC -lz -lsqlite3 -ObjC -lc++ -lsqlite3 -lz -LC:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries -lGoogleAnalytics -force_load C:/Users/CRoeder/AppData/Local/XamarinBuildDownloadCache/GAnlytcs-3.17/Libraries/libGoogleAnalytics.a -ObjC -lz -lsqlite3
2>C:\Program Files (x86)\Microsoft Visual Studio19\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(425,3): error : linker command failed with exit code 1 (use -v to see invocation)
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

我应该从哪里以及如何开始挖掘错误? 我对链接器不是很熟悉。

通过删除所有 nuget 包并手动重新安装解决了问题。