在TFS Build上不提取Nuget包(Nuget package not extracted on TFS Build)

编程入门 行业动态 更新时间:2024-10-22 23:05:03
在TFS Build上不提取Nuget包(Nuget package not extracted on TFS Build)

我正在尝试在TFS2015中设置自动构建。 目标是在签入时自动构建和测试解决方案,如果所有内容都通过了,那么将创建一个新的Nuget包并将其放置在本地存储库中。

这个过程适用于我的第一个解决方案,这是一个简单的项目,没有依赖关系。 从该项目创建的Nuget包随后被另一个项目用作依赖项。

在Visual Studio中构建时,此工作正常。 该软件包正常下载并提取。 但是,当我检查到TFS的第二个项目时,自动构建不能正确处理这个包。 该软件包从本地存储库中恢复,但未提取。 这意味着构建失败,因为它无法找到它需要的实际DLL。

我也在项目中使用EntityFramework,它可以正常工作。 该软件包已下载,但随后也会提取。

我已经尝试了此问题中给出的解决方法,但TFS服务器没有C:\ Users.nuget \ packages文件夹。

我也尝试使用这里的命令清除Nuget缓存,但再次没有帮助。

如果我手动提取由自动化构建下载的Nuget包,然后再次运行构建,它会起作用,这表明问题不在于包本身?

Nuget.exe版本是3.5。 .Net版本是4.5标准。 Packages在packages.config中引用,也可以通过项目引用进行引用。 Nuget.exe正在用于还原。

任何想法为什么本地包不被提取?

I am trying to set up automated builds in TFS2015. The goal is to have solutions automatically build and tested when checked in and if everything passes then a new Nuget package is created and placed in a local repository.

This process works fine for my first solution which is a simple project with no dependencies. The Nuget package that is created from this project is then used by a second project as a dependency.

This works fine when building in Visual Studio. The package is downloaded and extracted as normal. However when I check this second project in to TFS the automated build does not handle this package properly. The package is restored from the local repository but it is not extracted. This means that the build fails as it cannot find the actual DLL that it requires.

I am also using EntityFramework in the project and it works correctly. The package is downloaded but then it is also extracted.

I have tried the workaround given in this question but the TFS server does not have a C:\Users.nuget\packages folder.

I've also tried to clear the Nuget cache using the command here but again that didn't help.

If I manually extract the Nuget package that gets downloaded by the automated build and then run the build again it works which suggests that the issue isn't with the package itself?

Nuget.exe version is 3.5. .Net version is 4.5 standard. Packages are referenced in packages.config and also by project reference. Nuget.exe is being used for the restore.

Any idea on why the local package is not being extracted?

最满意答案

原因是我不小心在这个项目中的包文件夹中检查了一些内容,所以似乎来自我的本地Nuget文件夹实际上只是从项目中的包文件夹中复制出来。

从TFS中删除packages文件夹解决了这个问题。

仍然不确定为什么它没有在任何情况下提取软件包,但解决了问题。

The cause of this turned out to be that I had accidentally checked in the packages folder in this project as some point so what appeared to be coming from my local Nuget folder was actually just being copied out of the packages folder in the project.

Removing the packages folder from TFS resolved the issue.

Still not sure why it didn't extract the package in any case but problem solved.

更多推荐

本文发布于:2023-08-06 23:25:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1456766.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上不   Build   TFS   extracted   package

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!