do you have a .sln file for your solution? NuGet needs to find the .sln file to perform package restore. And in older version of NuGet, such error will be raised if .sln file cannot be found.
Heroku build failing when restoring NuGet packages
質問
I'm nearly there getting my F# project to compile under Heroku.
Unfortunately I've hit a problem.
It attempts to restore the nuget packages I get the error:
Target Build:
Project "/tmp/build_7ab344f5-4cd2-4af5-92cd-814069a4af70/NancyFirstProject/NancyFirstProject.fsproj" (default target(s)):
Target RestorePackages:
Executing: mono --runtime=v4.0.30319 /tmp/build_7ab344f5-4cd2-4af5-92cd-814069a4af70/.nuget/NuGet.exe install "" -source "" -RequireConsent -solutionDir "/tmp/build_7ab344f5-4cd2-4af5-92cd-814069a4af70/"
The specified path is not of a legal form (empty).
I've committed the NuGet.exe and all related NuGet files that are under the .NuGet folder along with my project.
NOTE: The project was created under VS2013. It builds and runs fine under Xamarin Studio
Any ideas welcome.
正しい解決策はありません
他のヒント
I've faced exactly the same problem. Finally, I've disabled NuGet package restore as a build step and decided to run restore separately:
wget http://nuget.org/nuget.exe
chmod +x nuget.exe
mono --runtime=v4.0 nuget.exe restore SolutionName.sln
所属していません StackOverflow