Skip to content

Commit

Permalink
Merge pull request #165 from signnow/drop-deprecated-netssandard
Browse files Browse the repository at this point in the history
Drop deprecated netstandard
  • Loading branch information
AlexNDRmac authored Dec 20, 2024
2 parents 29828d5 + 9e49c43 commit 7122c31
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 143 deletions.
46 changes: 17 additions & 29 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths-ignore:
- '**.md'
- 'SignNow.Net/SignNow.Net.Examples/**'
- '.github/workflows/release.yml'
tags-ignore:
- '**'
pull_request:
Expand All @@ -30,13 +31,13 @@ jobs:
matrix:
include:
# Ubuntu
- { name: 'Linux .NET 5', os: ubuntu-22.04, framework: 'net5' }
# macOs
- { name: 'macOS .NET 5', os: macos-13, framework: 'net5' }
- { name: 'Linux .NET 8', os: ubuntu-22.04, framework: 'net8.0' }
# macOs - disabled due to the same behavior as in Ubuntu
# - { name: 'macOS .NET 8', os: macos-13, framework: 'net8.0' }
# Windows
- { name: 'Windows .NET Core 3', os: windows-latest, framework: 'netcoreapp3.1' }
- { name: 'Windows .NET 5', os: windows-latest, framework: 'net5' }
- { name: 'Windows .NET 4.5', os: windows-latest, framework: 'net45' }
- { name: 'Windows .NET 7', os: windows-latest, framework: 'net7.0' }
- { name: 'Windows .NET 8', os: windows-latest, framework: 'net8.0' }
- { name: 'Windows .NET 4.6', os: windows-latest, framework: 'net462' }

env:
COREHOST_TRACE: false
Expand All @@ -46,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 @@ -59,10 +60,14 @@ jobs:

- name: Setup .NET SDK Version for Target Framework
run: |
If ("${{ matrix.framework }}" -eq "netcoreapp3.1") {
Write-Output "DOTNET_SDK_VERSION=3.1.x" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} ElseIf ("${{ matrix.framework }}" -eq "net5") {
Write-Output "DOTNET_SDK_VERSION=5.0.x" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
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 @@ -78,13 +83,6 @@ jobs:
key: ${{ runner.os }}-nuget-${{ matrix.framework }}-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-

- name: Setup dotnet tools
env:
DOTNET_ROOT: ${{ runner.tool_cache }}/dncs/${{ env.DOTNET_SDK_VERSION }}/x64
run: |
dotnet tool install --global InheritDocTool
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Restore Nuget packages
run: dotnet restore -v:n

Expand All @@ -93,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 @@ -108,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 "netcoreapp3.1") {
Write-Output "TARGET_FRAMEWORK=netstandard12" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} ElseIf ("${{ matrix.framework }}" -eq "net5") {
Write-Output "TARGET_FRAMEWORK=netstandard20" | 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
14 changes: 3 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 # prevent the caching of the packages on the build machine
DOTNET_NOLOGO: true # removes logo and telemetry message from first run of dotnet cli
NUGET_XMLDOC_MODE: skip # prevent the download of the XML documentation for the packages
DOTNET_SDK_VERSION: 5.0.x

defaults:
run:
Expand All @@ -24,12 +23,12 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup .NET 5
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
5.0.x
7.0.x
8.0.x
- name: Setup Nuget Cache
uses: actions/cache@v4
Expand All @@ -39,13 +38,6 @@ jobs:
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-

- name: Setup dotnet tool
env:
DOTNET_ROOT: ${{ runner.tool_cache }}/dncs/${{ env.DOTNET_SDK_VERSION }}/x64
run: |
dotnet tool install --global InheritDocTool --version 2.5.2
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Restore Nuget packages
run: dotnet restore -v:n

Expand Down
6 changes: 3 additions & 3 deletions .netconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[ReportGenerator]
reports = SignNow.Net.Test/bin/Debug/netcoreapp3.1/coverage.netcoreapp3.1.opencover.xml
reports = SignNow.Net.Test/bin/Debug/net45/coverage.net45.opencover.xml
reports = SignNow.Net.Test/bin/Debug/net5/coverage.net5.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"
reporttypes = Html;HtmlSummary
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com)
and this project adheres to [Semantic Versioning](http://semver.org).

## [Unreleased] - TBD
### Changed
- Upgraded .NET Core runtime to .NET 7.0 for Tests and Examples projects
- 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
### Added
Expand Down Expand Up @@ -94,8 +101,8 @@ and this project adheres to [Semantic Versioning](http://semver.org).
- `IFolderService.GetAllFoldersAsync` that allows you to get all user Folders with documents
- `IFolderService.GetFolderAsync` that allows you to get all details of a specific folder including all documents in that folder.
- `IFolderService.CreateFolderAsync` that allows you to create folder for a user.
- `IFolderService.DeleteFolderAsync` that allows you to deletes a folder.
- `IFolderService.RenameFolderAsync` that allows you to renames a folder.
- `IFolderService.DeleteFolderAsync` that allows you to delete a folder.
- `IFolderService.RenameFolderAsync` that allows you to rename a folder.
- `IDocumentService.MoveDocumentAsync` that allows you to move the document to a specified folder.


Expand Down Expand Up @@ -123,8 +130,8 @@ and this project adheres to [Semantic Versioning](http://semver.org).
- `Service.DocumentService.CreateOneTimeDownloadLinkAsync` that allows to share document via one-time URL
- `Service.UserService.CreateUserAsync` that allows to create an account for user
- `Service.UserService.UpdateUserAsync` that allows to update user information i.e. first name, last name
- `Service.UserService.SendVerificationEmailAsync` that allows to sends verification email to a user
- `Service.UserService.SendPasswordResetLinkAsync` that allows to sends password reset link to a user
- `Service.UserService.SendVerificationEmailAsync` that allows to send verification email to a user
- `Service.UserService.SendPasswordResetLinkAsync` that allows to send password reset link to a user

### Changed
- Increased timeout for Http Client
Expand Down Expand Up @@ -218,7 +225,7 @@ and this project adheres to [Semantic Versioning](http://semver.org).
- Implemented document ID parameter value validation in DocumentService.DeleteDocumentAsync method.


<!-- Aliases for URLs: please place here any long urls to keep clean markdown markup -->
<!-- Aliases for URLs: please place here any long urls to keep clean Markdown markup -->
[create role-based invite]: https://github.com/signnow/SignNow.NET/blob/develop/README.md#create-role-based-invite
[create freeform invite]: https://github.com/signnow/SignNow.NET/blob/develop/README.md#create-freeform-invite

Expand Down
22 changes: 0 additions & 22 deletions InheritDoc.targets

This file was deleted.

25 changes: 7 additions & 18 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 @@ -61,12 +61,11 @@ Get your account at <https://www.signnow.com/developers>
- [Get all document groups the user owns][doc_group_operations example]
- [Folders](#folders)
- [Get all folders](#get-all-folders)
- [Get folder by Id][get_folder example]
- [Get folder by ID][get_folder example]
- [Create folder][create_folder example]
- [Rename folder][rename_folder example]
- [Delete folder][delete_folder example]
6. [Contribution guidelines](#contribution-guidelines)
- [XML doc generation](#xml-doc-generation)
- [Important notes](#important-notes)
7. [License](#license)

Expand All @@ -86,12 +85,12 @@ 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 Core 3.0 and newer
- .Net Framework 4.6.2 or newer version should be installed in your system, or
- .Net 7.0 and newer

#### MacOS and Linux

- .Net Core 3.0 and newer
- .Net 7.0 and newer

## Installation

Expand Down Expand Up @@ -152,7 +151,7 @@ More examples: [Request Access token][request_access_token example], [Verify Acc

### Creates an account for a user

By default verification email is not sent to newly created User.
By default, verification email is not sent to newly created User.
To send it - use `IUserService.SendVerificationEmailAsync(string email)`

```csharp
Expand Down Expand Up @@ -632,16 +631,6 @@ More examples: [Get all folders][get_all_folders example], [Get folder][get_fold

## Contribution guidelines

### XML doc generation

For XML documentation generation, install InheritDocTool:

```bash
dotnet tool install -g InheritDocTool
```

More about the InheritDoc [here](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/examples#document-a-hierarchy-of-classes-and-interfaces)

### Important notes

Thanks to all contributors who got interested in this project. We're excited to hear from you. Here are some tips to make our collaboration meaningful and bring its best results to life:
Expand All @@ -664,7 +653,7 @@ If you have questions about the signNow API, please visit [signNow API Reference

**Sales**: For pricing information, please call (800) 831-2050, email [email protected] or visit <https://www.signnow.com/contact>.

<!-- Aliases for URLs: please place here any long urls to keep clean markdown markup -->
<!-- Aliases for URLs: please place here any long urls to keep clean Markdown markup -->
[actions build badge]: https://github.com/signnow/SignNow.NET/workflows/Build%20and%20Test/badge.svg "Build status"
[actions build link]: https://github.com/signnow/SignNow.NET/actions?query=workflow%3A%22Build+and+Test%22
[codecov badge]: https://codecov.io/gh/signnow/SignNow.NET/branch/develop/graph/badge.svg "Code coverage report"
Expand Down
10 changes: 5 additions & 5 deletions SignNow.Net.Examples/SignNow.Net.Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\netfx.props" />

<PropertyGroup>
<TargetFramework>net5</TargetFramework>
<TargetFramework>net7.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -12,13 +12,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
</ItemGroup>

<ItemGroup>
Expand Down
32 changes: 17 additions & 15 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>netcoreapp3.1;net45;net5</TargetFrameworks>
<TargetFrameworks>net462;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
Expand All @@ -12,35 +12,37 @@
<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>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
<!-- Do not upgrade Coverlet.MSBuild and Coverlet.Collector to avoid coverage report with missed methods -->
<PackageReference Include="coverlet.msbuild" Version="2.8.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Bogus" Version="35.6.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<ProjectReference Include="..\SignNow.Net\SignNow.Net.csproj" Properties="TargetFramework=netstandard1.2" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<ProjectReference Include="..\SignNow.Net\SignNow.Net.csproj" Properties="TargetFramework=netstandard2.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5' ">
<ProjectReference Include="..\SignNow.Net\SignNow.Net.csproj" Properties="TargetFramework=netstandard2.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<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
Loading

0 comments on commit 7122c31

Please sign in to comment.