Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.100'
dotnet-version: '3.1.x'

- name: Build project
run: dotnet build -c Release -f netstandard2.1 -o bin/ src/HybridModelBinding
run: dotnet build -c Release src/HybridModelBinding

- name: Create NuGet-package
if: steps.needs_packaging.outputs.value == 'true'
run: dotnet pack --no-build -p:OutputPath=../../bin/ src/HybridModelBinding
run: dotnet pack --no-build src/HybridModelBinding

- name: Publish NuGet-package
if: steps.needs_packaging.outputs.value == 'true'
run: dotnet nuget push -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_TOKEN}} -n true bin\*.nupkg
run: dotnet nuget push -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_TOKEN}} -n true src/HybridModelBinding/bin/*.nupkg
10 changes: 8 additions & 2 deletions src/HybridModelBinding/HybridModelBinding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Provides the ability to bind models using both ModelBinder and ValueProvider in ASP.NET Core.</Description>
<Authors>Bill Boga</Authors>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;netstandard2.1</TargetFrameworks>
<AssemblyName>HybridModelBinding</AssemblyName>
<PackageId>HybridModelBinding</PackageId>
<MinVerMinimumMajorMinor>0.18</MinVerMinimumMajorMinor>
Expand All @@ -12,10 +12,16 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<UserSecretsId>56b9ce4e-e8a6-4bdd-93ea-2e005b3cdb87</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.1.34" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="2.0.0">
Expand Down
2 changes: 2 additions & 0 deletions src/HybridModelBinding/ModelBinding/BodyValueProvider.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using HybridModelBinding.Extensions;
using Microsoft.AspNetCore.Http;
#if NETSTANDARD
using Microsoft.AspNetCore.Mvc.Internal;
#endif
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Newtonsoft.Json.Linq;
using System;
Expand Down
2 changes: 2 additions & 0 deletions src/HybridModelBinding/ModelBinding/HeaderValueProvider.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Microsoft.AspNetCore.Http;
#if NETSTANDARD
using Microsoft.AspNetCore.Mvc.Internal;
#endif
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System;
using System.Collections.Generic;
Expand Down