Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error occurs while installing the NUGET package in Visual Studio

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

like image 346
Alexey Strakh Avatar asked Mar 03 '14 07:03

Alexey Strakh


People also ask

How do I fix a NuGet package error?

Quick solution for Visual Studio usersSelect the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.

How do I force a NuGet package to Install?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.

How do I Install missing NuGet packages in Visual Studio 2019?

Restore packages manually using Visual StudioEnable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages. In Solution Explorer, right click the solution and select Restore NuGet Packages.


2 Answers

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.

like image 200
David Basarab Avatar answered Oct 05 '22 06:10

David Basarab


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.

like image 36
Colin Bacon Avatar answered Oct 05 '22 06:10

Colin Bacon