2

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?

Simon
  • 33,714
  • 21
  • 133
  • 202

4 Answers4

1

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.

user7116
  • 63,008
  • 17
  • 141
  • 172
1

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.

David Kean
  • 5,722
  • 26
  • 26
1

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.

Simon
  • 33,714
  • 21
  • 133
  • 202
  • 1
    The IIS issue is probably due to the lack of the 4.0 update called out in the docs as in my comment. Mono is a good point, and I didn't factor that in. – David Kean Sep 13 '12 at 02:16
0

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.

Dan Rigby
  • 17,133
  • 6
  • 43
  • 60