RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.62k stars 1.23k forks source link

Only reference Microsoft.Extensions.PlatformAbstractions in .NET 6+ b… #4785

Closed Numpsy closed 2 weeks ago

Numpsy commented 5 months ago

…uilds

A test based on the comments in https://github.com/RicoSuter/NSwag/pull/4716#issuecomment-1928068824 - it looks to me like Microsoft.Extensions.PlatformAbstractions is only used in the .NET 6/7/8 builds and not the .NET 4.6.2 build, so lets try excluding the NuGet package refernece in the 4.6.2 build

Numpsy commented 5 months ago

Hmm, not sure how that made the macOS tests fail :-(

RicoSuter commented 4 months ago

Is this PR still valid? Can you merge master in the branch?

Numpsy commented 4 months ago

I've rebased it onto the current master.

The macos CI is still fialing, but then it looks like the Ubuntu build at https://github.com/RicoSuter/NSwag/actions/runs/8287816759 failed with the same error, so I'm not sure if that's related to the change, or if something is flakey elsewhere :-(

Numpsy commented 4 months ago

maybe the wait time at https://github.com/RicoSuter/NSwag/blob/c0e16f9f6e4d692d3ab8dc6c7b2ce5e53498841c/src/NSwag.ConsoleCore.Tests/GenerateSampleSpecificationTests.cs#L57C25-L57C36 isn't long enough for the macos CI ?

RicoSuter commented 2 weeks ago

Thanks for the PR.