This project is read-only.

Error with multi packages with same base names


I get this error:
Exception Message: Search pattern 'XFramework.Web*.nupkg' retrieved more than one file at: \file001\Xperit Products\Builds\XFramework_Packages\XFramework_Packages_20130325.3\Packages (type ArgumentException)
Exception Stack Trace: at TfsBuild.NuGetter.Activities.GetFileNameUsingPattern.FindFile(String fileNamePattern, String searchFolder)
at TfsBuild.NuGetter.Activities.GetFileNameUsingPattern.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

This occurs when I have a packages named A.B and a package A.B.C. or A.BB.
I encounter this because I use namespace style of naming convention.

In 2.0/1 you changed the search pattern from name..nupkg to name.nupkg, because last year I already fixed it by renaming one package from A.B.C to A.BC to prevent conflict with package A.B. But now this is not a solution any more, so even A.B and A.BC does conflict.

Why using that pattern? Can't you just compose the fullname? You know the version of the package.


JaapM wrote Apr 16, 2013 at 2:36 PM

I have fixed it locally by changing the call to the GetFileNameUsingPattern activity in PerformNuGetPack.xaml. The GetFileNameUsingPattern.FileNamePattern is originally: "[String.Format("{0}*.nupkg", NuGetterVPackageName)]" (version 2.1).
I have changed it to: "[String.Format("{0}.{1}.nupkg", NuGetterVPackageName, Version)]".
This will only work when the Version variable has a value, which will Always be the case in my situation.
If Version is empty then it should be read from the nuspec file version element, which is not that difficult (the statement before GetFileNameUsingPattern read the packagename from the nuspec file).

wrote Jun 3, 2013 at 2:36 PM

wrote Jun 25, 2013 at 12:19 PM

wrote Sep 4, 2013 at 3:52 PM

wrote Sep 4, 2013 at 4:13 PM

wrote Oct 15, 2013 at 4:58 PM

wrote Nov 25, 2013 at 8:44 AM

wrote Dec 15, 2013 at 2:13 PM

wrote Jan 20, 2014 at 2:37 PM

KenCowley wrote Jan 20, 2014 at 2:39 PM

This issue needs resolving urgently as the pattern being used is completely ridiculous. I also use namespace style package names which makes the push operation non functional.

can this be included in the next release?

wrote Jan 31, 2014 at 11:31 AM

wesselkranenborg wrote Jan 31, 2014 at 12:15 PM

We also use namespace style packaging like KenCowly.

Can you fix this?

wrote Mar 26, 2014 at 5:24 PM

wrote Jul 7, 2014 at 11:42 AM

wrote Feb 19, 2015 at 7:53 AM

wrote Apr 9, 2015 at 3:00 PM