I have installed StructureMap using Nuget.
I do not want to checkin the created packages directory.
How do I recreate my package directory using packages.config
?
I tried Update-Package
with no success (nothing happended, I only get a little delay for the first time).
My packages.config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="structuremap" version="2.6.3" />
</packages>
See this article on the NuGet website: Using NuGet without committing packages to source control.
The article shows how to setup NuGet to restore all required packages for a solution. This NuGet feature is called "NuGet Package Restore".
I know you've approved an answer but I thought I'd share what I did.
In VS2010 I went to Tool->Library Package Manager > Package Manager Console in the Console I typed this command
PM> Install-Package NuGetPowerTools
Then I typed this
PM> Enable-PackageRestore
This put a folder called .nuget at the top level of my solution
In that folder I created a file called restore.bat with this as the content
cd ..
for /f "tokens=* delims=" %%i in ('dir /s /b packages.config') do (
.nuget\nuget.exe install -o packages "%%i"
)
cd .nuget
running the bat file will do a full reinstall of all the stuff in your package files
To finish off the job I made a solution folder in my project called .nuget and included the bat file and other junk that was in there just so another developer getting my project doesn't have to think too hard.
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