31

I'm trying to install Nokia Imaging SDK via NUGET under Visual Studio 2013 at my Windows Phone 8 project but every time I'm getting the following error:

A numeric comparison was attempted on "$(TargetPlatformVersion)" that evaluates to "" instead of a number, in condition "'$(TargetPlatformVersion)' > '8.0'". C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets

David Božjak
  • 16,887
  • 18
  • 67
  • 98
Mando
  • 11,414
  • 17
  • 86
  • 167

2 Answers2

100

When I got this error I just restarted Visual Studio and the error went away.

Please note, when I did restart the project did initially load, but I just right clicked and hit reload target and it did.

David Basarab
  • 72,212
  • 42
  • 129
  • 156
  • 7
    Note that I arrived here assuming that Resharper may need to be re-installed (8.2) but this was not necessary thanks to this simple solution. It is possible however that Resharper may have been responsible for the corruption so I disabled it during the visual studio restart just to be sure. It all works now thanks! – The Senator Jul 08 '14 at 08:15
  • 1
    @TheSenator probably you read https://nuget.codeplex.com/workitem/3996 too, I was just about to un-install resharper too :D – Lrrr Jan 12 '15 at 16:22
  • 1
    @Ali Amiri yes I read exactly that article! Also, I'm never satisfied with a 'reinstall and everything will be OK' mantra as it rarely is that simple and usually just wastes time! Glad you succeeded :) – The Senator Jan 12 '15 at 17:25
  • Getting this error on project creation (Add new project) with resharper disabled. – nVentimiglia Aug 12 '15 at 23:54
  • 1
    @nVentimiglia, update NuGet Package Manager to latest, and also ReSharper if you don't want to uninstall it. – Lex Li Sep 19 '15 at 04:53
4

If you have ReSharper installed it sounds like it could be this bug. This effected version 8.2 and has been fixed in build version 8.2.0.3169 and onwards.

Colin Bacon
  • 15,436
  • 7
  • 52
  • 72