Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Update to Net-standard 2.1 and update test project NuGet packages #3008

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

0x414c49
Copy link

@0x414c49 0x414c49 commented Mar 11, 2020

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the Nancy code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

The projects are targeted to .NET Standard 2.1, 2.0 and .NET 4.5.2. Due to this change minimum version of the SDK project changed to 3.1.102 -> rollForward minor.

The AsyncUsageAnalyzers is not supported in .NET Standard 2.1 and it's outdated. I replaced it with Microsoft.VisualStudio.Threading.Analyzers package.

FakeItEasy, XUnit and Microsoft Test Framework SDK are updated to the latest version.

This PR will resolve #3007

Ali Bahrami added 7 commits March 11, 2020 11:43
…yzers

AsyncUsageAnalyser is not under active maintaince and it's kinda deprecated and has not updated since years. Microsoft.VisualStudio.Threading.Analyzers is added as an replacement for it. This might cause new warnings.

NancyFx#3007
XUnit from alpha to 4.1, FakeItEasy from 4 to 6 and Microsoft.Net.Test.Sdk from 15.5.0 to 16.5.0

NancyFx#3007
@0x414c49
Copy link
Author

Builds are failing on Travis and AppVeyor because of the .NET SDK and Mono version. I need to see how to fix them.

Ali Bahrami added 4 commits March 11, 2020 15:15
xunit.runner.visualstudio (2.4.1) will run the jobs for dotnet test command. Microsoft.NET.Test.Sdk version changed to 15.5.0 from 16.5.0. The 16.5.0 version didn't copy testhost.dll to the output.

NancyFx#3007
- Travis-ci: Distro has changed to Ubuntu bionic, Mono changed to 6.8.0 and dotnet sdk to 3.1.102
- Appveyor: image changed to VS2019
- PowerShell script: CakeVersion updated to 0.37.0
- Bash script: DOTNET_INSTALL_URL updated
- For both powershell and bash, there was a bug in regex that couldn't detect versions like x.x.x00.
- Cake: The project is using `dotnet test` command. `xunit` command replaced with `test` command and arguments chagned to match dotnet test command.

NancyFx#3007
@0x414c49
Copy link
Author

  • Travis-ci: Distro has changed to Ubuntu bionic, Mono changed to 6.8.0 and dotnet SDK to 3.1.102
  • Appveyor: image changed to VS2019
  • PowerShell script: CakeVersion updated to 0.37.0
  • Bash script: DOTNET_INSTALL_URL updated
  • For both PowerShell and bash, there was a bug in regex that couldn't detect versions like x.x.x00.
  • Cake: The project is using dotnet test command. xunit command replaced with test command and arguments changed to match dotnet test command.
  • xunit.runner.visualstudio (2.4.1) will run the jobs for dotnet test command. Microsoft.NET.Test.Sdk version changed to 15.5.0 from 16.5.0. The 16.5.0 version didn't copy testhost.dll to the output.

AppVeyor pipeline is passing now, there is a problem with Travis in OSXand Linux. I need to investigate more.

@0x414c49
Copy link
Author

There is something interesting, Travis CI now supports .NET SDK 3.x.x by default. Why do we need to install it again?

@0x414c49
Copy link
Author

By replacing AsyncUsageAnalyzers with Microsoft.VisualStudio.Threading.Analyzers there are +500 warnings about async usages. They are mostly in test projects.

@0x414c49
Copy link
Author

The pipelines now compile fine. The tests are running fine Linux, OSX and on a local-machine. BrowserFixture.Should_return_JSON_serialized_form is failing on AppVeyor.

@0x414c49
Copy link
Author

0x414c49 commented Mar 12, 2020

I don't know why. I have a parallel test on my own AppVeyor account. The tests are passing fine there!

image

@0x414c49
Copy link
Author

By rerunning the build, everything works fine.

@0x414c49 0x414c49 mentioned this pull request Mar 12, 2020
4 tasks
@khellang
Copy link
Member

Why target .NET Standard 2.1? Nancy's not using any APIs from the standard. I'm failing to see what value it brings.

@0x414c49
Copy link
Author

@khellang you are right about the APIs. It's not a must but shouldn't keep the project updated to be able to use the latest APIs? like support for Span<T> in case of refactoring for memory, CPU performance?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Target .NET Standard 2.1
2 participants