How to use Nuget installer runner restore packages with no solution file?
I have experience with Ant, gradle and Maven but am relatively new to performing builds in the Microsoft environment.
I would like to request a new feature for TeamCity: the ability to create a nuget installer runner using a packages.config file without any solution file.
Here is the reason:
After reading "Inside the Microsoft Build Engine", the Supplement to..., and "MSBuild Trickery: 99 Ways to Bend the Build Engine to Your Will" I see that the advice from the professionals is for the central build not to rely on Visual Studio solution files, but rather to create a custom MSBuild script to build all of your projects.
e.g. "BuildAll.proj" or "BuildAll.msbuildproj"
(I am still not clear on the correct naming convention-- and I am still trying to get over the clunkiness of the suffix-- calling a group of projects a 'proj' ?).
Why do I need nuget?
Rather than have to install the MSBuild community tasks on every build agent, I would like the MSBuild script to download the Nuget package automatically before it starts, so my <import> statement works.
It seems that since version 1.7 Nuget has supported this concept via command-line package restore. I see there are two ways of running Nuget restore:
1) Nuget.exe restore foo.sln --- or ---
2) Nuget.exe restore packages.config -PackagesDirectory packages
Naturally, to follow the advice of the experts, I selected option #2, only to find that the TeamCity Nuget installer build runner does not support this option.
Nuget installer runner requires a VS solution file.
Can this feature be added to TeamCity? Am I missing something? How do the Microsoft Nuget experts get around this problem?
Thanks in advance,
--Craeg Strong
Please sign in to leave a comment.
Creg, it is definatly makes sence to add an option of restoring nuget packages by packages.config. Please vote for this feature request.
As a workaround please use restoring by sopution file option.