MakeGenericAgain 1.0.1

.NET 5.0 .NET Core 3.1
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global MakeGenericAgain --version 1.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local MakeGenericAgain --version 1.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=MakeGenericAgain&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package MakeGenericAgain --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MakeGenericAgain

Problem is that nswag client code generation from open api specification or swagger generates classes without generics. This tool can be used afterwards to make classes generic again

More infos about the general problem can be found here

To install it on other projects, add this to the csproj:

  <Target Name="MakeGenericAgain" AfterTargets="NSwag" Condition="'$(Configuration)' == 'Debug'">
    <Exec IgnoreExitCode="true" Command="dotnet tool install --global makeGenericAgain" />
    <Exec Command="makeGenericAgain -f $(SolutionDir)src\SDK\Net\v1\ClientGenerated.cs" />
  </Target>

To run int use

 makeGenericAgain -f "C:\Path\client.cs"
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.3 171 5/25/2022
1.0.2 58 5/23/2022
1.0.1 520 10/10/2021