Visual Studio - Cannot find or install Nuget package in project?

I recently had an error where I tried to install a nuget package in a project. From the nuget package console I got an error that it could not find it. I couldn not understand this as I could easily install the package in another project. But for some reason I could not install it into the project that I had just created. I also checked the install tab in "manage nuget packages". I found nothing, the package was not there (which was also odd) and I made sure I was looking in the correct nuget repository.

Then it hit me. The project I had just created was .Net 4.5. The nuget package was only built for 4.5.2. Visual Studio had by default created a 4.5 project. The error was simply a mismatch between the .net version of the package and the project. I simply changed the .Net version of the project to 4.5.2 and then I could easily see and install the package.

I hope this helps you! Let me know in the comments if it did :)