April 30th, 2013

A quick note about the new MinClientVersion attribute

In the NuGet 2.5 release, we added the MinClientVersion property to the package manifest schema to allow for a package to demand the minimum version of the NuGet client that can install it.

Because this feature was added in version 2.5, older versions of NuGet won’t be able to recognize it. Therefore, older clients will always refuse to install packages with the MinClientVersion property set, even if you set it to a value smaller than the version of the client.

For example, if you set MinClientVersion to 1.8, and the user tries to install your package with NuGet 2.2, the installation will fail even though 1.8 < 2.2. The user will see the following error message:

The schema version of ‘MyPackage’ is incompatible with version 2.2.1.0 of NuGet. Please upgrade NuGet to the latest version from http://go.microsoft.com/fwlink/?LinkId=213942.

In sum, this feature will grow in its utility over future NuGet iterations, starting with version 2.6

-Luan

Author

0 comments

Discussion are closed.