Question

At the moment I am building separate binaries to target each runtime

  • .net 4
  • Windows Phone
  • Silverlight

Now if I move the library over to be a single Portable Class Library, and I am not changing the functionality, is this considered a breaking change?

Or in SemVer terms is it a major, minor or patch version change?

Was it helpful?

Solution

I would say this is a minor version change because code which links against your library is now subject to some specific whims of the PCL:

When you deploy a .NET Framework 4 application that references a Portable Class Library assembly, you must specify a dependency on the .NET Framework 4 update. By specifying this dependency, you ensure that the update is installed with your application.

Also, if you have exposed certain Framework types, consumers of the code may need to change.

OTHER TIPS

Yes and no. As sixlettervariables called out, if previously targeting 4.0, yes, it is a breaking change to move to portable because you now have a dependency on a .NET Framework Update that you previously didn't. With the other platforms (or if targeting .NET 4.0.3 or higher), no, it not a breaking change.

While in theory this should be a minor change in reality it is a little more complicated.

Speaking form experience I have had several issues with upgrading assemblies to Portable class Libraries. These include:

These are most likely teething issues that will be solved in the future. But just be mindful of the possible upstream issues you may cause consumers of your library.

I would say if you can simply drop the new assembly in and everything just continues to work like it did before without any code modifications, then it's not a breaking change.

Switching to a PCL is a fairly neutral operation from the library consumer's perspective. It's still just a class library to them.

In semver terms, I think it would count as a minor version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top