Unable to use NuGet with my current TFS solution, works fine on non TFS solutions

Topics: General
Nov 1, 2012 at 11:14 PM

NuGet package manager 2.1.31002.9028

TFS 2010, VS 2010

On a non TFS solution, have no issues adding a library via NuGet. Try to add the exact same library to a project in my TFS solution, and I get a crpytic error:

------- Installing...YUICompressor.NET 2.1.1.0 -------Added file 'EcmaScript.NET.dll' to folder 'YUICompressor.NET.2.1.1.0\lib\NET20'.Added file 'Iesi.Collections.dll' to folder 'YUICompressor.NET.2.1.1.0\lib\NET20'.Added file 'Yahoo.Yui.Compressor.dll' to folder 'YUICompressor.NET.2.1.1.0\lib\NET20'.Added file 'YUICompressor.NET.2.1.1.0.nuspec' to folder 'YUICompressor.NET.2.1.1.0'.Added file 'YUICompressor.NET.2.1.1.0.nupkg' to folder 'YUICompressor.NET.2.1.1.0'.Successfully installed 'YUICompressor.NET 2.1.1.0'.Added file 'packages.config'.Added file 'packages.config' to project 'FrameworkAdmin'Added file 'packages.config'.Removed file 'packages.config'Install failed. Rolling back...Removed file 'EcmaScript.NET.dll' to folder '\Packages\YUICompressor.NET.2.1.1.0\lib\NET20'.Removed file 'Iesi.Collections.dll' to folder '\Packages\YUICompressor.NET.2.1.1.0\lib\NET20'.Removed file 'Yahoo.Yui.Compressor.dll' to folder '\Packages\YUICompressor.NET.2.1.1.0\lib\NET20'.Removed folder '/Packages\YUICompressor.NET.2.1.1.0\lib\NET20'.Removed folder '/Packages\YUICompressor.NET.2.1.1.0\lib'.Removed file 'YUICompressor.NET.2.1.1.0.nuspec' to folder '\Packages\YUICompressor.NET.2.1.1.0'.Removed file 'YUICompressor.NET.2.1.1.0.nupkg' to folder '\Packages\YUICompressor.NET.2.1.1.0'.Removed folder '/Packages\YUICompressor.NET.2.1.1.0'.Removed folder '/Packages'.Invalid URI: The format of the URI could not be determined.==============================

********

I get an equally weird output in TFS:

TF14079: The item C:\Packages is not part of your workspace.  Please perform a get operation on this item.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0.There is no working folder mapping for C:\Packages\YUICompressor.NET.2.1.1.0.The item C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20\EcmaScript.NET.dll could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20\Iesi.Collections.dll could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20\Yahoo.Yui.Compressor.dll could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0\lib\NET20 could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0\lib could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0\YUICompressor.NET.2.1.1.0.nuspec could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0\YUICompressor.NET.2.1.1.0.nupkg could not be found in your workspace, or you do not have permission to access it.The item C:\Packages\YUICompressor.NET.2.1.1.0 could not be found in your workspace, or you do not have permission to access it.The item C:\Packages could not be found in your workspace, or you do not have permission to access it.

I have never, EVER used a folder called C:\packages. I have no idea where TFS got that reference, and I don't want to put the packages in there either. The TFS solution already has a sub-folder named packages, and I would like to use that. Please help! 

Nov 2, 2012 at 2:50 AM

Hey,

By any chance do you have "repositoryPath" key set to "C:\Packages" in your nuget.config file (found under %appdata% or in any of the parent folders of your solution directory in C:\ ).

When you install packages to a non-TFS solution does the package gets installed in the "Packages" folder in your solution directory ?