简体   繁体   English

TFS获取最新版本不会还原引用

[英]TFS get latest version does not restore references

I have a project that i have been developing on my machine that is checked into source control (tfs). 我有一个正在计算机上开发的项目,该项目已签入源代码管理(tfs)。

I would now like another developer to work on the project with me. 我现在希望另一位开发人员与我一起从事该项目。 They have connected to the tfs server and configured the local workspace. 他们已连接到tfs服务器并配置了本地工作空间。 However when they say "get latest version", it downloads the project as expected, NUGET restores the packages as expected. 但是,当他们说“获取最新版本”时,它将按预期下载项目,NUGET将按预期还原软件包。 But pretty much all of the references to the packages show up as missing and thus the project will not compile. 但是几乎所有对软件包的引用都显示为丢失,因此该项目将无法编译。

Here is a screenshot of the issue. 这是问题的屏幕截图。

在此处输入图片说明

Here is my NuGet.Config 这是我的NuGet.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution>
</configuration>

and here is my .tfignore file 这是我的.tfignore文件

\packages
!\packages\repositories.config

I'm not quite sure what the issue could be. 我不太清楚问题可能是什么。 We are both using Visual Studio 2015 Enterprise Update 2 with TFS Express 2015 Update 2. Any help is appreciated. 我们都将Visual Studio 2015 Enterprise Update 2与TFS Express 2015 Update 2一起使用。感谢您的帮助。

  1. Check whether the Nuget Package Manager has updated to the latest version 检查Nuget软件包管理器是否已更新到最新版本
  2. Check the Nuget Package Manager setting in VS, make sure the items below are selected: 检查VS中的Nuget软件包管理器设置,确保选择了以下项目:

Allow NuGet to download missing packages 允许NuGet下载丢失的软件包

Automatically check for missing packages during build in Visual Studio 在Visual Studio中生成期间自动检查丢失的软件包

在此处输入图片说明

The problem in the end was that although i had created the .tfignore file, i had already checked in the packages folder into source control so this was having no effect. 最后的问题是,尽管我已经创建了.tfignore文件,但是我已经将packages文件夹签入到源代码管理中,因此这没有任何作用。

Deleting the packages folder from the code section in the tfs webpage resolved this issue and packages now restore as expected on new target machines. 从tfs网页的代码部分删除packages文件夹可以解决此问题,并且现在可以按预期在新目标计算机上还原包。

Thanks for all the help! 感谢您的所有帮助!

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

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