Skip to content

Remove the unused Microsoft.AspNet.WebApi.Client package #19

Open

Description

@hazeliscoding

QuickbaseNet.csproj references Microsoft.AspNet.WebApi.Client 6.0.0, but the library never uses it: there's no System.Net.Http.Formatting, ReadAsAsync or PostAsJsonAsync anywhere. Every project that installs QuickbaseNet still pulls it in. ROADMAP.md plans its removal for 1.1.

What to do

  • Delete the PackageReference on line 10 of QuickbaseNet/QuickbaseNet.csproj.
  • That breaks the net48 build with CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Net', because the package was what referenced the framework's System.Net.Http assembly. Add the reference back for net48 only:
<Reference Include="System.Net.Http" Condition="'$(TargetFramework)' == 'net48'" />
  • No code changes should be needed.

Where to look

  • QuickbaseNet/QuickbaseNet.csproj
  • QuickbaseNet/Services/QuickbaseClient.cs, line 2 (the using that breaks)

Done when

  • The package reference is gone
  • dotnet build succeeds for netstandard2.0, netstandard2.1, net5.0, net6.0 and net48
  • dotnet test passes
  • QuickbaseNet.nuspec inside the package from dotnet pack no longer lists Microsoft.AspNet.WebApi.Client (a .nupkg is a zip file)

Testing it

dotnet build
dotnet test
dotnet pack QuickbaseNet -o out

net48 builds on Linux and macOS too. CI builds it on Ubuntu.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions