无法为指定的URI添加部分,因为它已经在包中 [英] Cannot add part for the specified URI because it is already in the package

查看:114
本文介绍了无法为指定的URI添加部分,因为它已经在包中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在teamcity中使用NUGET Pack构建软件包.但是它正在创建以下错误.我正在使用nuget teamcity版本2.2.1.

I am using NUGET Pack in teamcity to build a package. But it is creating the following error. I am using nuget teamcity version 2.2.1.

Step 2/2: Build Package (NuGet Pack) (14s)

[12:10:40][Step 2/2] Cleaning Z:\hgbuilds\IT\Build\packages

[12:10:40][Step 2/2] pack: Create NuGet package from UI\UI.Tour\UI.Tour.Web\UI.Tour.Web.csproj (14s)

[12:10:40][pack] NuGet command: C:\BuildAgent\tools\NuGet.CommandLine.2.2.1.nupkg\tools\NuGet.exe pack Z:\hgbuilds\IT\UI\UI.Tour\UI.Tour.Web\Calrom.UI.InclusiveTour.Web.csproj -OutputDirectory Z:\hgbuilds\IT\Build\packages -BasePath Z:\hgbuilds\IT -Verbose -Version 1.0.0.7 -Symbols -Properties Configuration=Deploy-Test

[12:10:40][pack] Starting: C:\BuildAgent\temp\agentTmp\custom_script2086270793558421822.cmd

[12:10:40][pack] in directory: Z:\hgbuilds\IT

[12:10:45][pack] WARNING: Option 'Verbose' has been deprecated. Use 'Verbosity' instead.

[12:10:45][pack] Attempting to build package from 'UI.Tour.Web.csproj'.

[12:10:45][pack] Packing files from 'Z:\hgbuilds\IT\UI\UI.Tour\UI.Tour.Web\bin'.

[12:10:46][pack] WARNING: Description was not specified. Using 'Description'.

[12:10:48][pack] content

[12:10:54][pack] Cannot add part for the specified URI because it is already in the package.

[12:10:54][pack] Process exited with code 1

[12:10:54][Step 2/2] Step Build Package (NuGet Pack) failed

请在这里指导我所缺少的内容.

Please guide what I am missing here.

推荐答案

我遇到了相同的错误,但csproj文件中没有任何问题.我使用的是打字稿,无意中签入了.js文件.因此,在运行时正在生成另一个js文件,因此每个js文件中都添加了两个.

I had the same error but there were no issues in the csproj file. I was using typescript and was accidentally checking in the .js files. So at run-time another js file was being generated, thus there were two of each js files being added.

我通过查看团队城市构建日志并查找重复项来找到它.因为它们是不复制"的,所以简单的msbuild没有问题,但是正如我们刚刚切换到使用Octopack一样,在添加解决方案时无法添加多个.....

I found it by going through the team city build log and looking for duplicates. As they were "do not copy" there was no issue with a simple msbuild but as we just switched to using Octopack, cannot add multiple when nugeting a solution.....

您可以找到罪魁祸首(打字稿或其他),因为这是尝试创建行"之后首次出现的罪魁祸首(可能有很多,但一次找到它们可能是比手动操作容易)

You can find the culprit (typescript or otherwise) as it will be the first to appear after the "attempting to create line" (there could be many but finding them on at a time could be easier than doing it manually)

这篇关于无法为指定的URI添加部分,因为它已经在包中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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