NuGet license text is ignored while uninstalling when content with license text is in packages folder and content of package without license text is in the project


Smaller repro:
  1. In VS 2013 create new MVC project
  2. Open jquery.js
  3. remove license text information from the top
  4. uninstall-package jquery
    uninstall-package jquery -force
    Removing 'jQuery 1.10.2' from WebApplication1.
    Skipping 'Scripts\jquery-1.10.2.js' because it was modified.
    Successfully removed 'jQuery 1.10.2' from WebApplication1.
    Uninstalling 'jQuery 1.10.2'.
    Successfully uninstalled 'jQuery 1.10.2'.
Original repro:
create package foo 1.0 with no license text
foo 1.0 with license text added to it
  1. create a console app
  2. install foo 1.0 without the license text
  3. delete package folder
  4. drop foo with license text package to c:\temp. Add c:\temp as the only active package source
  5. restore package in console app from c:\temp
  6. now you have content with license text in packages folder and contents of foo without license text in the project folder
  7. uninstall foo
    PM> uninstall-package foo
    Removing 'foo 1.0' from ClassLibrary3.
    Skipping 'content.js' because it was modified.
    Successfully removed 'foo 1.0' from ClassLibrary3.

file attachments

Closed Oct 18, 2013 at 8:53 PM by feiling
Verified that it's no repro with the build on 9/27/2013.


JeffHandley wrote Oct 4, 2013 at 1:58 AM

If I understand this correctly, you've added the license text to the packages folder side of the comparison and we're not ignoring it; correct?

Can you illustrated the change in the packages folder for what license text was added to it?

dotnetjunky wrote Oct 4, 2013 at 5:44 AM

I'm pretty sure I covered and tested this case. Are you using the correct build?

deepakverma wrote Oct 4, 2013 at 11:33 PM

@dotnetjunky, verified that I am using the latest build and license text is the only diff (attached screenshot)

dotnetjunky wrote Oct 5, 2013 at 12:13 AM

I can't repro it from the build at \nuget-ci-dev12\drops\2.7.2\latest-successful.

I'll leave it to whoever investigates this further ;)