Tool used to "Fix" NuGet packages so that they work in Win and macOS
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 "$(OutputPath)$(PackageId).$(PackageVersion).nupkg"" /> </Target>
Comments
-
Is this specifically for LINQPad data context drivers, i.e., XPF? There shouldn't be any other scenario that requires this, unless there's an issue either with LINQPad or the package.