When I run
Nuget.exe restore [path]\packages.config -PackagesDirectory [path]\build\packages
it works as expected. However, the command
Nuget.exe restore [path]\bigpackages.config -PackagesDirectory [path]\build\packages
fails with the error:
No file format header found.
This is the case, even if I copy the packages.config file and rename it to bigpackages.config.
It turns out that the name packages.config is expected, but any other config file name is rejected.
My solution was to put my bigpackages.config file in a subfolder, using the accepted filename. This command succeeds:
Nuget.exe restore [path]\big\packages.config -PackagesDirectory [path]\build\packages
You should use NuGet v3 which appears to correctly handle such files.
It was NuGet 2.8 to introduce support for Individual packages.config Files for Different Platforms but even 2.8.6 correcltly handles them only within the solution restore procedure.
As I undestand all files with names other than exactly packages.config
are treated as solution files. And the error is produced by the MSBuild run internally by the NuGet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With