How do I make an existing C# library UWP-compatible?

I have a simple data structure published to NuGet that's semi-popular. It doesn't use any special Windows APIs, so I would expect it to be already compatible with UWP.

However, when people try to add a reference through NuGet, they see

<Project> is not compatible with UAP,Version=v10.0.
Some packages are not compatible with UAP,Version=v10.0.

What do I need to do to make my project compatible with UWP (while still keeping compatibility with non-UWP projects, including .Net 2.0 support)? I've read answers online ranging from "add this .json file" to "you need to maintain an entirely separate project"!

Upvotes: 2

Views: 1842

Answers (1)

Lex Li
Lex Li

Reputation: 63289

Several approaches right now,

  1. Write a PCL which enables UWP compatibility.
  2. Write a UWP class library which links to the common source files.
  3. Migrate the library to .NET Core.

I use the last for my open source library and the blog post covers the details,

https://blog.lextudio.com/2016/03/how-to-port-snmp-library-to-net-core/

Upvotes: 3

Related Questions