diff --git a/BTCPayServer/Hosting/Startup.cs b/BTCPayServer/Hosting/Startup.cs index 2ede5c971..ee8d071dc 100644 --- a/BTCPayServer/Hosting/Startup.cs +++ b/BTCPayServer/Hosting/Startup.cs @@ -79,7 +79,11 @@ namespace BTCPayServer.Hosting // StyleSrc = "'self' 'unsafe-inline'", // ScriptSrc = "'self' 'unsafe-inline'" //}); - }).AddNewtonsoftJson().AddControllersAsServices(); + }) +#if !NETCOREAPP21 + .AddNewtonsoftJson() +#endif + .AddControllersAsServices(); services.TryAddScoped(); services.Configure(options => {