Under nuget 2.5, using xbuild (Mono 3.0.6 OSX) doesn't restore packages because of an extra space found on line 54 in the NuGet.targets file:
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " </RestoreCommand>
The extra space is found here "$(SolutionDir) ". By removing the extra space such that it looks like "$(SolutionDir)", the package build process works perfectly.
This is very easy to fix in any repositories where the NuGet.targets file is already committed, but would be overwritten when pointing to a newer release of NuGet.
Comments: @jonathansoliver: can you elaborate on the "crazy reason"? What happens when the space is not there in Windows? I also don't understand how the trailing space would be considered an extra directory in Linux/Mac.
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " </RestoreCommand>
The extra space is found here "$(SolutionDir) ". By removing the extra space such that it looks like "$(SolutionDir)", the package build process works perfectly.
This is very easy to fix in any repositories where the NuGet.targets file is already committed, but would be overwritten when pointing to a newer release of NuGet.
Comments: @jonathansoliver: can you elaborate on the "crazy reason"? What happens when the space is not there in Windows? I also don't understand how the trailing space would be considered an extra directory in Linux/Mac.