NancyFx / Nancy.Serialization.JsonNet

NewtonSoft.Json serializer for Nancy
MIT License
40 stars 32 forks source link

Exception when using Nancy.Serialization.JsonNet after upgrading to Nancy 2.0.0 #72

Open qusma opened 5 years ago

qusma commented 5 years ago

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.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

Gouar commented 5 years ago

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").

bmhoang commented 5 years ago

I got the same issue