Errors while building a NuGet-enabled Project

Topics: General
Dec 26, 2012 at 5:10 AM

I've been trying to build a code downloaded from here. The problem is that whenever i try building it, i always receive following 3 errors:
1. D:\NuGetPackageVisualizer-master\.nuget\nuget.targets(87,9): error : 'C:\Documents' is not recognized as an internal or external command,
2. D:\NuGetPackageVisualizer-master\.nuget\nuget.targets(87,9): error : operable program or batch file.
3. D:\NuGetPackageVisualizer-master\.nuget\nuget.targets(87,9): error MSB3073: The command ""D:\NuGetPackageVisualizer-master\.nuget\nuget.exe" install "D:\NuGetPackageVisualizer-master\packages.config" -source "" -RequireConsent -solutionDir "D:\NuGetPackageVisualizer-master\ "" exited with code 1.

The line number 87 in Nuget.targets is:
< Exec Command="$(RestoreCommand)" LogStandardErrorAsError="true" Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />

And there is no "C:\Documents" directory.
Instead, there is a directory named "C:\Documents and Settings/..."in C: which contain the 2 NuGet-related directories.
- One is: C:\Documents and Settings\Muneeb\Application Data\NuGet,which contains the NuGet.Config file.
- The other one is: C:\Documents and Settings\Muneeb\Local Settings\Application Data\NuGet,which contains the Cache directory.
I'm facing this problem not only in this project but in any other that i try to download and build.
But if I create a project from scratch, no such build error would come!
I've pounded my head alot but am unable to fix this issue.
Any help in this regard will be greatly appreciated! Thanks

Dec 26, 2012 at 5:59 PM

That project is not owned by us. Please post your question on the Issues page of that project, or contact the author directly.

Dec 27, 2012 at 2:38 PM
dotnetjunky wrote:

That project is not owned by us. Please post your question on the Issues page of that project, or contact the author directly.

Thanks for the reply @dotnetjunky but i'm facing this problem on every code that i try to create or download. 

Also i realized that the problem occurs when i enable "NuGet Package Restore" or if i check the option "allow NuGet to download missing packages during build"

Dec 28, 2012 at 4:10 PM

Ah I see. What happens is that these projects probably use an old version of the NuGet.Build package which contains a bug when dealing with directory path that has space in it. Try updating the nuget.targets file to the latest version. You can get it from by installing the latest version of NuGet.Build package. http://nuget.org/packages/NuGet.Build