0

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

1 Answer 1

3

'C:\Documents' is not recognized as an internal or external command

The process appears to be interpreting the spaces in the offending path as distinct arguments. Try surrounding the path in double quotes.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for the reply @John. I also know this, but where should I surround the path in double quotes?
The $(RestoreCommand) chains together a bunch of paths and parameters, unfortunately. I wonder if this issue might be related to yours?
maybe you're right @John. i just realized that the problem occurs whenever i enable "NuGet Package Restore" or if i check the option "allow NuGet to download missing packages during build" under the tools -> package manager -> general -> package restore
I'm posting this issue on NuGet as a bug. Answer Accepted! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.