Tool used to "Fix" NuGet packages so that they work in Win and macOS

Options

I wrote a tool that will update a NuGet package so that it can be loaded from the LINQPad NuGet manager on either Windows or macOS.

It basically goes through the package and renames any framework name that ends with "-windowsX.Y" to just the framework and version (e.g., nnet8.0-windows7.0 => net8.0). It will also update the nuspec file accordingly. To obtain help on the parameters pass "--help" on the command line.

You can find it here.

Below is an example on how you can use it within your csproj file:

<Target Name="NuGetUpdate" AfterTargets="Pack"> <Exec Command="Tools\NuGetUpdPkgStruct.exe &quot;$(OutputPath)$(PackageId).$(PackageVersion).nupkg&quot;" /> </Target>

Comments