Nuget包不会安装

问题描述 投票:0回答:1

我试图在一个项目中安装owin,它失败了以下错误,它不是真正描述性的。如果我创建一个新项目,它的工作正常。如何找出导致错误的原因

我用-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
c# nuget owin
1个回答
0
投票

如何找出导致错误的原因[?]

-Verbose旗帜传递给Install-Package。输出有望更准确地告诉您出了什么问题。也许文件正在使用中,无法复制或修改?

更新:感谢OP提供的额外信息,我认为Nuget Package updates & Package.config remove issue (TF400024)可以解答您的问题(提示:它与您的项目没有从源代码管理中检出)。查看项目,然后重试。

© www.soinside.com 2019 - 2024. All rights reserved.