Simon
Simon

Reputation: 34880

Is moving over to a Portable Class Library a breaking change?

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

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?

Upvotes: 2

Views: 319

Answers (4)

Simon
Simon

Reputation: 34880

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.

Upvotes: 1

David Kean
David Kean

Reputation: 5772

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.

Upvotes: 1

user7116
user7116

Reputation: 64128

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.

Upvotes: 1

Dan Rigby
Dan Rigby

Reputation: 17893

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.

Upvotes: 0

Related Questions