NuGet 包更新和Package.config 删除问题 (TF400024) [英] NuGet Package updates & Package.config remove issue (TF400024)

查看:21
本文介绍了NuGet 包更新和Package.config 删除问题 (TF400024)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近遇到了 NuGet 包更新和 TFS 源代码控制集成的问题.这给我们的团队带来了很多麻烦,让我们在完全采用 NuGet 包时犹豫不决.

We are having issues with NuGet package updates and TFS source control integration lately. This is causing allot of hassles with our team and making us hesitate in adopting NuGet packages fully.

问题/错误:不是更新某些项目的package.config"文件,而是将它们从文件系统中删除(并在 TFS 源代码控制中标记为已删除)我不知道为什么.

The issue/bug: instead of updating certain projects "package.config" files, they are being removed from the file system (and marked as deleted within TFS source control) I can't work out why.

我们看到的行为如下:

  1. 在 VS.NET 2012 中打开解决方案(大约 18 个项目)
  2. 通过包管理对话框启动解决方案级别包更新到最新版本,如 这里.
    • package.config 存在,并且是所述选定解决方案中项目的一部分.
    • 这些 packages.configs 尚未从 TFS 中签出.

我注意到了这一点并撤消签出和得到这个错误:

I notice this and Undo Check-Out & get this error:

TF400024: The change on xxxpackages.config cannot be undone because a file already exists at xxxpackages.config. The file must be deleted from disk for the undo to succeed.

  • 有趣的是,对于 TFS,文件被标记为已删除,但它仍驻留在我的文件系统上?
  • 下面列出的包管理器提供的输出并不表明已删除 package.config 的项目存在任何问题.

    The output provided by Package Manager listed below does not indicate any issues for the project in which the package.config was removed.

    Updating 'NugetPackageAssemblyA' from version '1.5.18.0' to '1.5.23.0' in project 'CommonUnitTests'.
     Removed reference 'AssemblyAA.dll' from project 'CommonUnitTests'
     Removed reference 'AssemblyBB.dll' from project 'CommonUnitTests'
     Removed reference 'AssemblyCC.dll' from project 'CommonUnitTests'
     Removed reference 'NugetPackageAssemblyA.dll' from project 'CommonUnitTests'
     Added file 'packages.config'.
     Removed file 'packages.config'
     Successfully removed 'NugetPackageAssemblyA 1.5.18.0' from CommonUnitTests.
     Added reference 'AssemblyAA' to project 'CommonUnitTests'
     Added reference 'AssemblyBB' to project 'CommonUnitTests'
     Added reference 'AssemblyCC' to project 'CommonUnitTests'
     Added reference 'NugetPackageAssemblyA' to project 'CommonUnitTests'
     'packages.config' already exists. Skipping...
     Successfully added 'NugetPackageAssemblyA 1.5.23.0' to CommonUnitTests.
    

    开发.环境统计:

    • Nuget 包管理器:版本 2.2.40116.9051
    • Visual Studio 2012:版本 11.051106.01 更新 1

    我有什么遗漏的吗?

    推荐答案

    简单的将代码签入到 Visual Studio Online 就为我解决了问题.

    A simple check-in of the code to Visual Studio Online did the trick for me.

    这篇关于NuGet 包更新和Package.config 删除问题 (TF400024)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆