Skip to content

Commit

Permalink
Shim Microsoft.Extensions.Configuration.IConfiguration for net45 and …
Browse files Browse the repository at this point in the history
…netstandard1.3

Fix #135
  • Loading branch information
aleksaradz authored and FantasticFiasco committed Oct 18, 2020
1 parent dc4b673 commit 7fb3fd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if !NETSTANDARD_2_0
#if NET45 || NETSTANDARD_1_3
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.Configuration
{
Expand Down
10 changes: 9 additions & 1 deletion src/Serilog.Sinks.Http/Serilog.Sinks.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,21 @@
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
<DefineConstants>$(DefineConstants);NET45</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'net461'">
<DefineConstants>$(DefineConstants);HRESULTS</DefineConstants>
</PropertyGroup>

<!-- .NET STANDARD -->

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<DefineConstants>$(DefineConstants);NETSTANDARD_1_3</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net45' And '$(TargetFramework)' != 'netstandard1.3'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.9" />
</ItemGroup>

Expand Down

0 comments on commit 7fb3fd2

Please sign in to comment.