How do I package a .NET library that has the following properties in a modern general-purpose way?
- Offers some shared functionality to both .NET Framework 4.6 and Universal Windows Platform.
- Offers some platform-specific functionality to each (e.g. specialized classes or APIs, including XAML user controls for UWP) with potential platform-specific dependencies on external libraries.
- Is architecture-agnostic (AnyCPU).
- The portable subset of which can be used by other portable libraries that target a compatible API surface.
This is a series of questions and answers that document my findings on the topic of modern NuGet package authoring, focusing especially on the changes introduced with NuGet 3. You may also be interested in some related questions:
- How to package a .NET Framework library?
- How to package a .NET library targeting the Universal Windows Platform?
- How to package a portable .NET library targeting .NET Core?
- How to package a multi-architecture .NET library that targets the Universal Windows Platform?
- How to package a .NET library that targets the Universal Windows Platform and depends on Visual Studio extension SDKs?