1

Closed

Can't install any package using nuGet package manager in Visual Studio

description

I just updated the nuGet Package manager. The version number is 2.2.40... Now, I am trying to install one package using nuGet Package Manager. and it is throwing an error. It is happening with only one web project. I have other web projects where I could install that package successfully. The error message is below:

" Access to the path 'C:\Users\kpatel\documents\visual studio 2010\Projects\CorpEmailManager\CorpEmailManager\packages.config' is denied. At line:1 char:16 + Install-Package <<<< Microsoft.AspNet.Mvc.FixedDisplayModes + CategoryInfo : NotSpecified: (:) [Install-Package], UnauthorizedAccessException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand"


I am attaching my package.config file also.


Thanks in advance for help.

file attachments

Closed Feb 28, 2013 at 9:52 PM by dotnetjunky

comments

JeffHandley wrote Feb 21, 2013 at 10:53 PM

Have you tried explicitly checking the file out from TFS before doing the install-package? This seems like the file is marked as readonly and cannot be edited by NuGet when the package is being installed.

Since this is only happening in a single project, it seems like there's something wrong with that particular file. Are you able to check the file out and edit it through VS yourself, or even notepad?

knpatel wrote Feb 22, 2013 at 3:54 PM

I added the .dll file manually, and also added the entry into package.config file. But still Opera Mini browser is not loading _Layout.mobile.cshtml view. I think it is still not recognizing mobile browser. Please help out to solve this issue.

Please check the attachment.


Thanks

JeffHandley wrote Feb 22, 2013 at 4:32 PM

We cannot help with the function of the actual assembly. For that, you'll need to log an issue on the ASP.NET Web Stack, here: http://aspnetwebstack.codeplex.com/.

I'd like to help you resolve the "cannot install the NuGet package" problem though. Since you're able to modify the packages.config file yourself, I presume you got past the file being locked. Are you now able to install/uninstall packages using NuGet?

knpatel wrote Feb 22, 2013 at 6:19 PM

Ok. Thanks for reply. I will post this issue to web stack.

dotnetjunky wrote Feb 26, 2013 at 5:14 PM

Can you answer JeffHandley's question below? Are you able to check out the file and install nuget packages afterwards?

knpatel wrote Feb 26, 2013 at 10:52 PM

I uninstalled NuGet Package Manager. And re-installed it. And I could install required package.