dotnet pack: packing projects with package references results in duplicate import warning #3665

Closed
joelverhagen opened this Issue Oct 14, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@joelverhagen
Member

joelverhagen commented Oct 14, 2016

Steps

  1. Extract this project: msbuild.zip
  2. Run dotnet pack3 on ProjectA.

Expected

Pack should succeed with no warning.

Actual

Warnings about NuGet.Build.Tasks.Pack.targets being imported multiple times.

C:\Users\jver\Desktop\packproj\msbuild\ProjectB\obj\ProjectB.csproj.nuget.g.targets(11,5): warning MSB4011: "C:\Users\jver\.nuget\packages\nuget.build.tasks.pack\3.6.0-rc-1984\build\NuGet.Build.Tasks.Pack.targets" cannot be imported again. It was already imported at "C:\Users\jver\Desktop\dotnet\1.0.0-preview3-003842\sdk\1.0.0-preview3-003842\Microsoft.Common.CurrentVersion.targets (5611,3)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Users\jver\Desktop\packproj\msbuild\ProjectB\ProjectB.csproj]
C:\Users\jver\Desktop\packproj\msbuild\ProjectC\obj\ProjectC.csproj.nuget.g.targets(11,5): warning MSB4011: "C:\Users\jver\.nuget\packages\nuget.build.tasks.pack\3.6.0-rc-1984\build\NuGet.Build.Tasks.Pack.targets" cannot be imported again. It was already imported at "C:\Users\jver\Desktop\dotnet\1.0.0-preview3-003842\sdk\1.0.0-preview3-003842\Microsoft.Common.CurrentVersion.targets (5611,3)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Users\jver\Desktop\packproj\msbuild\ProjectC\ProjectC.csproj]
C:\Users\jver\Desktop\packproj\msbuild\ProjectD\obj\ProjectD.csproj.nuget.g.targets(11,5): warning MSB4011: "C:\Users\jver\.nuget\packages\nuget.build.tasks.pack\3.6.0-rc-1984\build\NuGet.Build.Tasks.Pack.targets" cannot be imported again. It was already imported at "C:\Users\jver\Desktop\dotnet\1.0.0-preview3-003842\sdk\1.0.0-preview3-003842\Microsoft.Common.CurrentVersion.targets (5611,3)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Users\jver\Desktop\packproj\msbuild\ProjectD\ProjectD.csproj]

Environment

NuGet.Build.Tasks.Pack/3.6.0-rc-1984
Microsoft.NET.Sdk/1.0.0-alpha-20161013-3

dotnet --info

.NET Command Line Tools (1.0.0-preview3-003842)

Product Information:
 Version:            1.0.0-preview3-003842
 Commit SHA-1 hash:  3ae14ab618

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64

/cc @rohit21agrawal

@rrelyea rrelyea added this to the 3.6 RC milestone Oct 14, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Oct 14, 2016

Contributor

restore has same bug.

Contributor

rrelyea commented Oct 14, 2016

restore has same bug.

@rrelyea rrelyea modified the milestones: 4.0 RC2, 4.0 RC Oct 27, 2016

@rrelyea rrelyea modified the milestones: 4.0 RC2, 4.0 RC3 Nov 29, 2016

@rrelyea rrelyea changed the title from dotnet pack3: packing projects with package references results in duplicate import warning to dotnet pack: packing projects with package references results in duplicate import warning Jan 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment