Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Install/restore of a particular package fails with "Package contains multiple nuspec files." #3231
Steps to repro:
This also occurs at least when restoring a packages.config with this specific package version. I manually downloaded the package and it only appears to have one nuspec. Strangely, running the same install command again without clearing the caches does not repro the bug.
I believe I've found the issue.
Microsoft.TeamFoundationServer.Client 14.83.0 does only contain one nuspec. However, it is named Microsoft.TeamFoundation.Client.nuspec (note the lack of the word Server). When the package is unpacked, Microsoft.TeamFoundation.Client.nuspec ends up on disk in the global packages folder, but so does a copy of it named microsoft.teamfoundationserver.client.nuspec, so there are then two .nuspec files in the folder.
I verified that this was the critical element by modifying the package so that the name of the nuspec matched the package name, pushing the modified package to a private package source, clearing my locals, and installing again from the private source. The package installed without complaint.