Command Line - Update issue

Feb 24, 2012 at 12:07 AM
Edited Feb 24, 2012 at 5:46 PM

Hi,

I am trying to use Update Command for updating one of my NuGet packages in a solution. However, it is not able to update it successfully. I can see the .csproj file partially updated to point to new package version path but it fails to update two location in .csproj file (1 - MsnRfPackagePath and 2 - Custom import statement). Another issue I am seeing is, not creating the new folder under Packages folder for the new version.

Here is the command I am trying:

NuGet.exe update "...\packages.config" -Verbose -Source "...\Release\Packages" -RepositoryPath  "...\MyApp\packages"

I remember seeing this working sometime back. Am I doing something wrong or command line tool is updated and that is behaving this way? The current version of EXE I am working with is:

NuGet Version: 1.6.21205.9031

 

Related, is there a plan to add Uninstall command to this tool?

Regards,

Nirav

 

Feb 26, 2012 at 3:30 PM

After running the update command, you are supposed to call "NuGet.exe install  ..." to reinstate the package binaries.

Feb 27, 2012 at 11:42 PM

Thanks dotnetjunky!

I tried calling Install command after Update and it does actually copies all binaries in the new version folder for the package. However, it seems Install.ps1 script is not getting executed on either of commands (which actually updates my custom properties in .csproj as mentioned in my first post). Is there a way I can force Install.ps1 to execute?

 

Feb 27, 2012 at 11:48 PM

Powershell scripts are not executed at all by nuget.exe. There's no way to force it to excute install.ps1.