Nuget 1.3: some observations
I’m testing out a lot of features from NuGet for extending our software factory. In this testing I made the following observations:
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="EntityFramework" version="4.1.10331.0" /> <package id="T4Scaffolding" version="1.0.0" /> <package id="MacawSolutionsFactory-Core" version="1.0.0" /> <package id="MacawSolutionsFactory-Spf2010" version="1.0.0" /> </packages>
<?xml version="1.0" encoding="utf-8"?> <repositories> <repository path="..\srcfactory\Core\packages.config" /> <repository path="..\srcfactory\Spf2010\packages.config" /> </repositories>
You can execute the command Install-Package NuGetPSVariables to validate some of the above observations.
UPDATE 1:
- Great NuGet documentation on http://docs.nuget.org (uses open source MarkDown based documentation system: http://nugetdocs.codeplex.com) [Thanks Cyriel!]
<li><font color="#ff0000">No files required in Content folder for Init.ps1 to run</font> </li>
<li><font color="#ff0000">If a project is removed from a solution (and not deleted from the filesystem) the <strong>packages.config</strong> file in the removed project is still referenced in the <strong>packages\repositories.config</strong> file. It is now not possible to remove a package at solution level that is also referenced by the removed project. Delete the removed project from the filesystem to solve this issue.</font> </li>
<li><font color="#ff0000">Add the <strong>packages.config</strong> files in your project folders to your Visual Studio project (Show hidden files on project, Include in project) and include in source control. Set the build action to none otherwise the file could be included in the project output [Thanks Marino!]</font> </li>
<li><font color="#ff0000">Add the <strong>packages</strong> folder to source control (or at least the <strong>packages\repositories.config</strong> file)</font> </li>
UPDATE 2:
- When a solution is loaded the script Tools\Init.ps1 of all packages is executed. In execution of the Init.ps1 scripts the package dependencies are respected. So if package A depends on package B, the script B\Tools\Init.ps1 is executed before script A\Tools\Init.ps1.
UPDATE 3:
-
When a package is installed, the Tools folder is added to the PATH environment variable ($env:PATH) with process scope, so scripts and applications in the tools folder can be directly executed from the NuGet console. Note that if you uninstall the package, the Tools folder of the uninstalled package in NOT removed from the PATH. When the package is installed again, the Tools folder is added to the again, so it appears twice in the PATH.