Search code examples
.netoauthnugetstormpath

Could not find plugin Stormpath SDK JsonNetSerializer


I'm facing an issue with StormPath when trying to get my application. I am developing in .NET Framework.

I can clearly see in my NuGet packages that Stormpath.SDK.JsonNetSerializer has been installed when I installed Stormpath.SDK.

However, I'm getting this error:

Error while loading the default serializer. See the inner exception for details.
Inner Exception: Could not find plugin 'Stormpath.SDK.JsonNetSerializer'. Try specifying the plugins manually.


Solution

  • I'm the author of the package. Sorry about the confusion; this is a problem that happens in some environments. In the next major version, I'm going to refactor the internals to remove this error mode.

    In the mean time, try specifying the plugins manually to get around it:

    var client = Clients.Builder()
        .SetHttpClient(HttpClients.Create().RestSharpClient())
        .SetSerializer(Serializers.Create().JsonNetSerializer())
        .Build();