NickCraver / StackExchange.Exceptional

Error handler used for the Stack Exchange network
https://nickcraver.com/StackExchange.Exceptional/
Apache License 2.0
860 stars 170 forks source link

Add ExceptionalSettingsExtensions.Bind to the base package #117

Closed stijnherreman closed 6 years ago

stijnherreman commented 6 years ago

I'm using Microsoft.Extensions.Configuration outside of ASP.NET Core. Can you add https://github.com/NickCraver/StackExchange.Exceptional/blob/cdca58d2431e12e280dbb0f10ab533f3eee4d3e3/src/StackExchange.Exceptional.AspNetCore/ExceptionalSettings.cs#L38 to https://github.com/NickCraver/StackExchange.Exceptional/blob/cdca58d2431e12e280dbb0f10ab533f3eee4d3e3/src/StackExchange.Exceptional/ExceptionalSettings.cs ?

NickCraver commented 6 years ago

I'm curious, where are you using this outside ASP.NET Core?

I'm not against it if it doesn't diminish the install experience, but we need to check installing on a .NET 4.6.1+ (say for ASP.NET non-Core) and netstandard2.0 to ensure we don't cause cascading hell on the dependency tree. I ask because we'll have to move the dependency down to .Shared. I'm catching up on issues so if you want to take a crack at this in a PR I'll definitely get to it quicker - otherwise I'll try to soon as time allows.

stijnherreman commented 6 years ago

I'm using this in ASP.NET Web API 2 projects and a Windows Service project, all running on net471. Mixing the JSON configuration provider and the Azure Key Vault configuration provider. I hadn't really thought about my situation being rather uncommon.

I'll try to make a PR that doesn't impact other users too much.

NickCraver commented 6 years ago

I've decided to go ahead and remove net451 support now before release. This was necessary for moving .Bind() since the config lib is netstandard2.0 only which supports only net461+. We're dropping support for net45* across all libs for similar reasons really, it's simply impractical to support it at this point.

Can you please give latest MyGet packages a try and see if binding works as expected?

stijnherreman commented 6 years ago

Thanks, just tested the latest version and it's working as expected.