Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3117

How to add ref assemblies to NuGet package via MSBuild pack target?

$
0
0

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?


Viewing all articles
Browse latest Browse all 3117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>