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
Using WrikeWebHook library on ASP.NET Core 3.0+ or Framework 5.0+ causes cast exception because recent ASP.NET doesn't use Newtonsoft.JSON library by default.
Solution is to use Microsoft.AspNetCore.Mvc.NewtonsoftJson package and add services.AddControllers().AddNewtonsoftJson(); in startup.cs program.
This applies to Visual Studio 2019 and ASP.NET MVC project type.
Can be reproduced by using WrikeWebHookControllerBase abstract class.
Thought it could be helpful to mention this in documentation. No need to change code.
The text was updated successfully, but these errors were encountered:
Oozza
changed the title
WrikeWebHook exception on recent .NET versions
WrikeWebHook causes exception on recent .NET versions
Feb 14, 2022
Sorry, I don't use Git. If I did I would edit Readme.md to include this text under Webhook section.
NOTE: WrikeApiClient uses Newtonsoft.json serializer, which is not default serializer on ASP.NET Core 3.0+ or Framework 5.0+ versions. On recent ASP.NET projects you may need to install Microsoft.AspNetCore.Mvc.NewtonsoftJson package and activate it with code like this.
Using WrikeWebHook library on ASP.NET Core 3.0+ or Framework 5.0+ causes cast exception because recent ASP.NET doesn't use Newtonsoft.JSON library by default.
Solution is to use Microsoft.AspNetCore.Mvc.NewtonsoftJson package and add
services.AddControllers().AddNewtonsoftJson();
in startup.cs program.This applies to Visual Studio 2019 and ASP.NET MVC project type.
Can be reproduced by using WrikeWebHookControllerBase abstract class.
Thought it could be helpful to mention this in documentation. No need to change code.
The text was updated successfully, but these errors were encountered: