I am developing a library that targets net35 (.NET Framework 3.5), netstandard2.0 (.NET Standard 2.0) and netcoreapp3.1 (.NET Core 3.1) via TargetFrameworks.
For one of the functionalities, the library uses WPF internally so this functionality only works when targeting net35 (.NET Framework 3.5) and netcoreapp3.1 (.NET Core 3.1).
I use MSBuild pack target to create a NuGet package for my library but since WPF is used for netcoreapp3.1, I also create reference assembly for netcoreapp3.1 so that consumers on non-Windows platforms use that ref assembly when building their project as explained in this PackageReference support section.
My question is: how to instruct MSBuild pack target to include the reference assembly in 'ref/' folder of the created NuGet package?