You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error MM0099: Can't create a token reference to an unregistered type when using the managed static registrar: LinkAll.LinkAllRegressionTest/ProtocolWithGenericsInOptionalMemberWrapper
#18973
Closed
rolfbjarne opened this issue
Sep 8, 2023
· 1 comment
· Fixed by #19031
make build BUILD_ARGUMENTS="/p:PublishAot=true /p:_IsPublishing=true" -C tests/linker/ios/link\ all/dotnet/macOS
Result:
ILLINK : warning MM2016: Keeping the dynamic registrar (by passing '--optimize=-remove-dynamic-registrar') is not possible, because the dynamic registrar is not supported when using NativeAOT. Support for dynamic registration will still be removed. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
ILLINK : warning MM2003: Option '--optimize=force-rejected-types-removal' will be ignored since it's only applicable to iOS, watchOS, tvOS, MacCatalyst. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(356): warning MM4176: Unable to locate the delegate to block conversion type for the return value of the method Bindings.Test.SimpleCallback Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::get_MyOptionalProperty(). [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(356): warning MM4174: Unable to locate the block to delegate conversion method for the method System.Void Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::set_MyOptionalProperty(Bindings.Test.SimpleCallback)'s parameter #1. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(359): warning MM4176: Unable to locate the delegate to block conversion type for the return value of the method Bindings.Test.SimpleCallback Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::get_MyRequiredProperty(). [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(359): warning MM4174: Unable to locate the block to delegate conversion method for the method System.Void Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::set_MyRequiredProperty(Bindings.Test.SimpleCallback)'s parameter #1. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(362): warning MM4176: Unable to locate the delegate to block conversion type for the return value of the method Bindings.Test.SimpleCallback Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::get_MyOptionalStaticProperty(). [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(362): warning MM4174: Unable to locate the block to delegate conversion method for the method System.Void Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::set_MyOptionalStaticProperty(Bindings.Test.SimpleCallback)'s parameter #1. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(365): warning MM4176: Unable to locate the delegate to block conversion type for the return value of the method Bindings.Test.SimpleCallback Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::get_MyRequiredStaticProperty(). [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/bindings-test/RegistrarBindingTest.cs(365): warning MM4174: Unable to locate the block to delegate conversion method for the method System.Void Xamarin.BindingTests.RegistrarBindingTest/FakePropertyBlock::set_MyRequiredStaticProperty(Bindings.Test.SimpleCallback)'s parameter #1. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
ILLink : MacOSX error IL7000: An error occured while executing the custom linker steps. Please review the build log for more information. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
ILLINK : error MM0099: Can't create a token reference to an unregistered type when using the managed static registrar: LinkAll.LinkAllRegressionTest/ProtocolWithGenericsInOptionalMemberWrapper [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
ILLINK : error MM2362: The linker step 'Registrar' failed during processing: Can't create a token reference to an unregistered type when using the managed static registrar: LinkAll.LinkAllRegressionTest/ProtocolWithGenericsInOptionalMemberWrapper [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
/Users/rolf/work/maccore/nativeaot/xamarin-macios/packages/microsoft.net.illink.tasks/8.0.0-rc.2.23431.9/build/Microsoft.NET.ILLink.targets(87,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. [/Users/rolf/work/maccore/nativeaot/xamarin-macios/tests/linker/ios/link all/dotnet/macOS/link all.csproj]
Build FAILED.
The text was updated successfully, but these errors were encountered:
…pes to register. Fixesxamarin#18973.
Protocol wrapper types may be nested types, so make sure to look in nested
types when looking for protocol wrapper types.
Fixesxamarin#18973.
…pes to register. Fixes#18973. (#19031)
Protocol wrapper types may be nested types, so make sure to look in nested
types when looking for protocol wrapper types.
Fixes#18973.
Repro:
Result:
The text was updated successfully, but these errors were encountered: