SignalR for UWP .NET Native breaks when moving from 3.1 to 5 RC2
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Creating a straightforward SignalR client hub in a UWP app complied using .NET Native, using Newtonsoft option to keep .NET Native happy.
var connection = new HubConnectionBuilder().
WithUrl("myurl").
AddNewtonsoftJsonProtocol().
Build();
This works fine using:
-Microsoft.AspNetCore.SignalR.Client 3.1.9
-Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson 3.1.9
Then updating to:
-Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson 5.0.0-rc.2.20475.17
HubConnectionBuilder now fails throwing a MissingMetadataException.
System.Reflection.MissingMetadataException: 'Microsoft.Extensions.Options.IPostConfigureOptions<>' is missing metadata. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=392859
at SharedLibrary!+0xc37113
at SharedLibrary!+0xc34d8d
at SharedLibrary!+0xc341cf
at SharedLibrary!+0xc3f0f8
at SharedLibrary!+0xc3fe8c
at SharedLibrary!+0x9b0ed3
at SharedLibrary!+0x9b0d20
at System.Reflection.Runtime.General.TypeResolver.TryResolveTypeSignature(TypeSpecificationHandle, MetadataReader, TypeContext, Exception&) + 0x3e0
at System.Reflection.Runtime.General.TypeResolver.TryResolve(Handle, MetadataReader, TypeContext, Exception&) + 0xb1
at System.Reflection.Runtime.General.TypeResolver.TryResolveTypeSignature(TypeSpecificationHandle, MetadataReader, TypeContext, Exception&) + 0x3ab
at System.Reflection.Runtime.General.TypeResolver.TryResolve(Handle, MetadataReader, TypeContext, Exception&) + 0xb1
at System.Reflection.Runtime.General.QSignatureTypeHandle.TryResolve(TypeContext, Exception&) + 0x4b
at System.Reflection.Runtime.General.QSignatureTypeHandle.Resolve(TypeContext) + 0x2e
at System.Reflection.Runtime.ParameterInfos.RuntimeMethodParameterInfo.get_ParameterType() + 0x45
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x75
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x2b7
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(ServiceDescriptor, Type, CallSiteChain, Int32, Boolean) + 0xf0
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(Type, CallSiteChain) + 0xad
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0x9c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x88
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x170
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(ServiceDescriptor, Type, CallSiteChain, Int32, Boolean) + 0xf0
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(Type, CallSiteChain) + 0xad
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0x9c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x88
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x2b7
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor, Type, CallSiteChain, Int32) + 0x10e
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type, CallSiteChain) + 0x83
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0x86
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x88
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x170
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor, Type, CallSiteChain, Int32) + 0x10e
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateEnumerable(Type, CallSiteChain) + 0x2bc
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0xb2
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x88
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x2b7
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(ServiceDescriptor, Type, CallSiteChain, Int32, Boolean) + 0xf0
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(Type, CallSiteChain) + 0xad
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0x9c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x88
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x170
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(ServiceDescriptor, Type, CallSiteChain, Int32, Boolean) + 0xf0
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(Type, CallSiteChain) + 0xad
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0x9c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type, Type, CallSiteChain, ParameterInfo[], Boolean) + 0x88
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache, Type, Type, CallSiteChain) + 0x170
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor, Type, CallSiteChain, Int32) + 0x10e
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type, CallSiteChain) + 0x83
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type, CallSiteChain) + 0x86
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.b__0(Type) + 0x10
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type, CallSiteChain) + 0x7c
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type) + 0x68
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey, Func`2) + 0x9a
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type, ServiceProviderEngineScope) + 0x2b
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type) + 0xc
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type) + 0x14
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider) + 0x39
at Microsoft.AspNetCore.SignalR.Client.HubConnectionBuilder.Build() + 0x43
at Mads.Models.Core.Clients.WebApi.d__30.MoveNext() + 0x146
Contributor guide
Assessment
This issue has not been assessed yet.