Nuget: What is the purpose of the <package requireReinstallation /> attribute in packages.config?

I upgraded my C# project (which already had some nuget packages) from 4.0 to 4.5.2. I saw that some <package /> elements now contain an additional attribute requireReinstallation="true".

  • What is the purpose of this?

  • Why is that some packages have while others don't.

Before

<package id="NLog" version="3.1.0.0" targetFramework="net40" />

After

<package id="NLog" version="3.1.0.0" targetFramework="net40" requireReinstallation="true" />

From the release notes

If we detect that any of your packages were affected by the retargeting or upgrade, we’ll produce immediate build errors to let you know. In addition to the immediate build error, we also persist a requireReinstallation="true" flag in your packages.config file for all packages that were affected by the retargeting, and each subsequent build in Visual Studio will raise a build warnings for those packages.

Essentially, NuGeT is automatically flagging packages which conflict with your project target or version