Method 'CanDeserialize' in type 'Nancy.Serialization.JsonNet.JsonNetBodyDeserializer' from assembly 'Nancy.Serialization.JsonNet, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at Nancy.Extensions.AssemblyExtensions.SafeGetExportedTypes(Assembly assembly)
at Nancy.DefaultTypeCatalog.<>c.b4_0(Assembly assembly)
at System.Linq.Enumerable.d172.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Nancy.DefaultTypeCatalog.GetTypesAssignableTo(Type type)
at Nancy.DefaultTypeCatalog.<>cDisplayClass3_0.b0(Type t)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at Nancy.DefaultTypeCatalog.GetTypesAssignableTo(Type type, TypeResolveStrategy strategy)
at Nancy.TypeCatalogExtensions.GetTypesAssignableTo[TType](ITypeCatalog typeCatalog)
at Nancy.Bootstrapper.NancyInternalConfiguration.<>c.b__1_0(ITypeCatalog typeCatalog)
at Nancy.Bootstrapper.NancyBootstrapperBase1.GetInitializedInternalConfiguration() at Nancy.Bootstrapper.NancyBootstrapperBase1.Initialise()
at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper bootstrapper, HostConfiguration configuration, Uri[] baseUris)
at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper bootstrapper, Uri[] baseUris)
Steps to Reproduce
Simply launch nancy with the json.net serializer.
System Configuration
.NET 4.7
Nancy version: 2.0.0
Nancy host
[ ] ASP.NET
[ ] OWIN
[x] Self-Hosted
[ ] Other:
Other Nancy packages and versions:
Environment (Operating system, version and so on):
Hi,
I got the same exception today after upgrading to Nancy 2.0.0. I fixed it by upgrading Nancy.Serialization.JsonNet from 1.4.1 to 2.0.0-clinteastwood (check "Include prerelease").
Description
Method 'CanDeserialize' in type 'Nancy.Serialization.JsonNet.JsonNetBodyDeserializer' from assembly 'Nancy.Serialization.JsonNet, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeAssembly.GetExportedTypes() at Nancy.Extensions.AssemblyExtensions.SafeGetExportedTypes(Assembly assembly) at Nancy.DefaultTypeCatalog.<>c.b4_0(Assembly assembly)
at System.Linq.Enumerable.d17b 0(Type t)
at System.Collections.Concurrent.ConcurrentDictionaryb__1_0(ITypeCatalog typeCatalog)
at Nancy.Bootstrapper.NancyBootstrapperBase
2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator
1.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable
1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Nancy.DefaultTypeCatalog.GetTypesAssignableTo(Type type) at Nancy.DefaultTypeCatalog.<>cDisplayClass3_0.2.GetOrAdd(TKey key, Func
2 valueFactory) at Nancy.DefaultTypeCatalog.GetTypesAssignableTo(Type type, TypeResolveStrategy strategy) at Nancy.TypeCatalogExtensions.GetTypesAssignableTo[TType](ITypeCatalog typeCatalog) at Nancy.Bootstrapper.NancyInternalConfiguration.<>c.1.GetInitializedInternalConfiguration() at Nancy.Bootstrapper.NancyBootstrapperBase
1.Initialise() at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper bootstrapper, HostConfiguration configuration, Uri[] baseUris) at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper bootstrapper, Uri[] baseUris)Steps to Reproduce
Simply launch nancy with the json.net serializer.
System Configuration
.NET 4.7