简体   繁体   English

Nuget软件包无法安装

[英]Nuget package won't install

I am trying to install owin in a project and it fails with the below error its not real descriptive. 我正在尝试在项目中安装owin,但由于以下错误而失败,它不是真正的描述性错误。 If I create a new project it works just fine. 如果我创建一个新项目,它就可以正常工作。 How can I find out what is causing the error 我如何找出导致错误的原因

I updated with -verbose but no extra info 我更新了-verbose,但没有其他信息

Adding package 'Microsoft.AspNet.Identity.Core.2.2.1' to folder 'c:\Workspace\Ruby\pfg.producealliance.com\packages'
Install failed. Rolling back...
Package 'Microsoft.AspNet.Identity.Core.2.2.1' does not exist in project 'Ruby.Web'
Removing package 'Microsoft.AspNet.Identity.Core.2.2.1' from folder 'c:\Workspace\Ruby\pfg.producealliance.com\packages'
TF400024: The change on c:\Workspace\Ruby\pfg.producealliance.com\packages\Microsoft.AspNet.Identity.Core.2.2.1\Microsoft.AspNet.Identity.Core.2.2.1.nupkg cannot be undone because a file already exists at c:\Workspace\Ruby\pfg.producealliance.com\packages\Microsoft.AspNet.Identity.Core.2.2.1\Microsoft.AspNet.Identity.Core.2.2.1.nupkg. The file must be deleted from disk for the undo to succeed.
Install-Package : TF400024: The change on c:\Workspace\Ruby\pfg.producealliance.com\packages\Microsoft.AspNet.Identity.Core.2.2.1\Microsoft.AspNet.Identity.Core.2.2.1.nupkg cannot be undone because a file already exists at 
c:\Workspace\Ruby\pfg.producealliance.com\packages\Microsoft.AspNet.Identity.Core.2.2.1\Microsoft.AspNet.Identity.Core.2.2.1.nupkg. The file must be deleted from disk for the undo to succeed.
At line:1 char:1
+ Install-Package Microsoft.AspNet.Identity.Owin -ProjectName Ruby.Web  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

How can I find out what is causing the error[?] 我如何找出导致错误的原因[?]

Pass the -Verbose flag to Install-Package . -Verbose标志传递给Install-Package The output will hopefully tell you more precisely what went wrong. 希望输出将更准确地告诉您出了什么问题。 Perhaps a file is in use and cannot be copied or modified? 也许文件正在使用中,无法复制或修改?

UPDATE: Thanks to the additional info provided by the OP, I think Nuget Package updates & Package.config remove issue (TF400024) answers your problem (hint: it's related to your project not being checked out from source control). 更新:感谢OP提供的附加信息,我认为Nuget软件包更新和Package.config删除问题(TF400024)可以解决您的问题(提示:与您的项目未从源代码管理中签出有关)。 Check out the project and try again. 签出该项目,然后重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM