I'm using Visual studio 2019 and asp.net web api application. I've installed NuGet Package manager with version 5.11. When I'm trying to install webapi cors I'm getting the following error:
Error downloading 'Microsoft.AspNet.Cors.5.2.7' from 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.cors/5.2.7/microsoft.aspnet.cors.5.2.7.nupkg'.Access to the path 'C:\Users\User\.nuget\packages\microsoft.aspnet.cors\5.2.7' is denied.
I've cleared the cache and tried to re-download but still no luck. I've tried all the solution in the question and question but still it is throwing that error.I've tried it through command line and from nu get package console and still same error.Any help is appreciated. Thanks.