Skip to content

Commit

Permalink
Upgrade NET 4.5 to NET 4.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNDRmac committed Dec 20, 2024
1 parent 0b0ec9f commit 900ead4
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 27 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# Windows
- { name: 'Windows .NET 7', os: windows-latest, framework: 'net7.0' }
- { name: 'Windows .NET 8', os: windows-latest, framework: 'net8.0' }
- { name: 'Windows .NET 4.5', os: windows-latest, framework: 'net45' }
- { name: 'Windows .NET 4.6', os: windows-latest, framework: 'net462' }

env:
COREHOST_TRACE: false
Expand All @@ -47,7 +47,7 @@ jobs:
NUGET_XMLDOC_MODE: skip # prevent the download of the XML documentation for the packages
COVERAGE_PATH: SignNow.Net.Test/bin/Debug
# Do not generate summary otherwise it leads to duplicate errors in build log
DOTNET_BUILD_ARGS: SignNow.Net --configuration Debug /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true
DOTNET_BUILD_ARGS: /consoleloggerparameters:NoSummary /property:GenerateFullPaths=true

defaults:
run:
Expand All @@ -62,8 +62,12 @@ jobs:
run: |
If ("${{ matrix.framework }}" -eq "net7.0") {
Write-Output "DOTNET_SDK_VERSION=7.0.x" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "TARGET_FRAMEWORK=netstandard20" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} ElseIf ("${{ matrix.framework }}" -eq "net8.0") {
Write-Output "DOTNET_SDK_VERSION=8.0.x" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "TARGET_FRAMEWORK=netstandard21" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} Else {
Write-Output "TARGET_FRAMEWORK=462" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- name: Setup .NET SDK
Expand All @@ -87,7 +91,7 @@ jobs:

- name: Build and Pack Solution
run: |
dotnet build ${{ env.DOTNET_BUILD_ARGS }}
dotnet build SignNow.Net --configuration Debug ${{ env.DOTNET_BUILD_ARGS }}
dotnet pack --configuration Release --output ./SignNow.Net/bin/Publish SignNow.Net
- name: Run Tests on ${{ matrix.framework }} with Coverage
Expand All @@ -102,16 +106,6 @@ jobs:
name: CoverageReports-${{ runner.os }}-${{ matrix.framework }}.zip
path: SignNow.Net.Test/bin/Debug/**/coverage*

- name: Setup Code Coverage report flags
run: |
If ("${{ matrix.framework }}" -eq "net7.0") {
Write-Output "TARGET_FRAMEWORK=netstandard20" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} ElseIf ("${{ matrix.framework }}" -eq "net8.0") {
Write-Output "TARGET_FRAMEWORK=netstandard21" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} Else {
Write-Output "TARGET_FRAMEWORK=net45" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- name: Test Release Notes parser
if: (runner.os == 'macOS' || runner.os == 'Linux')
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .netconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ReportGenerator]
reports = SignNow.Net.Test/bin/Debug/net45/coverage.net45.opencover.xml
reports = SignNow.Net.Test/bin/Debug/net462/coverage.net462.opencover.xml
reports = SignNow.Net.Test/bin/Debug/net7.0/coverage.net7.0.opencover.xml
reports = SignNow.Net.Test/bin/Debug/net8.0/coverage.net8.0.opencover.xml
targetdir = "SignNow.Net.Test/bin/coverage-html"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org).
- Drop support for .NET Core 2.1 and 3.1 (dropper netstandard 1.x)
- Updated netstandard min version to 2.0
- Removed InheritDoc tool from the project
- Upgraded NET Framework min supported version to 4.6.2


## [1.3.0] - 2024-12-18
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## About signNow

signNow.Net is the official .NET 4.5+ and .NET Standard class library for the signNow API. signNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts. Track status of your requests and download signed copies automatically.
signNow.Net is the official .NET 4.6.2+ and .NET Standard class library for the signNow API. signNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts. Track status of your requests and download signed copies automatically.

Get your account at <https://www.signnow.com/developers>

Expand Down Expand Up @@ -85,7 +85,7 @@ To start using the API you will need an API key. You can get one here <https://

#### Windows

- .Net Framework 4.5 or newer version should be installed in your system, or
- .Net Framework 4.6.2 or newer version should be installed in your system, or
- .Net 7.0 and newer

#### MacOS and Linux
Expand Down
8 changes: 4 additions & 4 deletions SignNow.Net.Test/SignNow.Net.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\SignNow.props" />

<PropertyGroup>
<TargetFrameworks>net45;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
Expand All @@ -12,7 +12,7 @@
<NoWarn>1801,1591</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
</ItemGroup>
Expand All @@ -39,8 +39,8 @@
<ProjectReference Include="..\SignNow.Net\SignNow.Net.csproj" Properties="TargetFramework=netstandard2.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<ProjectReference Include="..\SignNow.Net\SignNow.Net.csproj" Properties="TargetFramework=net45" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<ProjectReference Include="..\SignNow.Net\SignNow.Net.csproj" Properties="TargetFramework=net462" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions SignNow.Net/Exceptions/SignNowException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace SignNow.Net.Exceptions
{
#if NET45 || NETSTANDARD2_0
#if NET462 || NETSTANDARD2_0
[Serializable]
#endif
public class SignNowException : AggregateException
Expand Down Expand Up @@ -78,7 +78,7 @@ public SignNowException(string message, HttpStatusCode httpStatusCode) : base(me
HttpStatusCode = httpStatusCode;
}

#if NET45 || NETSTANDARD2_0
#if NET462 || NETSTANDARD2_0
protected SignNowException(SerializationInfo info, StreamingContext context) : base (info, context) { }
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions SignNow.Net/Service/SignNowClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using SignNow.Net.Internal.Model;
using SignNow.Net.Model;

#if NET45
#if NET462
using System.Net;
#endif

Expand Down Expand Up @@ -67,7 +67,7 @@ public static string XUserAgentString
/// </param>
public SignNowClient(HttpClient httpClient = null)
{
#if NET45
#if NET462
// With .NET Framework 4.5, it's necessary to manually enable support for TLS 1.2.
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
#endif
Expand Down
4 changes: 2 additions & 2 deletions SignNow.Net/SignNow.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\SignNow.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net462</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageId>SignNow.NET</PackageId>
Expand All @@ -27,7 +27,7 @@
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.WebRequest" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion SignNow.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Authors>signNow</Authors>
<Company>signNow</Company>
<Title>SignNow.NET</Title>
<Description>signNow.Net is a .NET 4.5+ and .NET standard class library for the signNow API. (Official Library)
<Description>signNow.Net is a .NET 4.6.2+ and .NET standard class library for the signNow API. (Official Library)
signNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts. Track status of your requests and download signed copies automatically.</Description>
<Copyright>airSlate Inc.</Copyright>

Expand Down

0 comments on commit 900ead4

Please sign in to comment.