Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not install package 'Owin 1.0.0.' You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2'

I'm trying to implement OAuth on my ASP.NET Web Api project. I'm downloading the packages from NuGet. my friend can normally download all OWIN packages on his machine, but It's not working on my machine. I tried removing Visual studio cache, TFS cache, VSCommon cache, resetting visual studio, I also tried reinstalling visual studio, and nothing is working. I also tried all .net framework versions from 4.0 to 4.6.1 I'm using Visual Studio 2015 community update 1. The error I'm getting looks like the following:

Could not install package 'Owin 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

like image 815
Ibraheem Al-Saady Avatar asked Dec 31 '15 16:12

Ibraheem Al-Saady


Video Answer


1 Answers

I believe I found the solution.

I ran into the same issue, and it was impacting more than just the Owin package.

I tried flushing my user cache and even uninstalling and reinstalling Visual Studio (deleting any AppData files that seemed related), but the problem persisted.

However, clearing the data in C:\Users\<<UserName>>\.nuget\packages has resolved the issue.

like image 187
Beofett Avatar answered Sep 23 '22 23:09

Beofett