Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Closed Issue: Uninstalling packages show unexpected behavior for packages that overwrite the same file in project [3115]

$
0
0
Repro steps:
1. create a c# class library project
2. install OverwriteSameFileOne package (attached), click yes when asked to overwrite
3. install OverwriteSameFileTwo package (attached), click yes when asked to overwrite
4. uninstall OverwriteSameFileTwo package, then OverwriteSameFileOne package


Expected: class1.cs gets removed from the project when uninstalling OverwriteSameFileTwo package, be consistent with the behavior of if choosing yes, the file is removed from the project.

Actual: class1.cs stay as-is, after step 4 above is completed

now do step 5 below:
5. install OverwriteSameFileOne package (attached), click yes when asked to overwrite
6. install OverwriteSameFileTwo package (attached), click yes when asked to overwrite
7. uninstall OverwriteSameFileOne package, then OverwriteSameFileTwo package


Expected: class1.cs gets removed from the project when uninstalling OverwriteSameFileOne package, be consistent with the behavior of if choosing yes, the file is removed from the project.

Actual: class1.cs stays after uninstalling OverwriteSameFileOne package, and got removed from the project after uninstalling OverwriteSameFileOne package.


In summary, the order of uninstalling packages that overwrites the same file matters, for what files are left over in the project system. This may be a bad thing that causes confusion.
Comments: This is the correct behavior. At step #3, when you install package Two and choose Yes, the Class1.cs has the content from package Two. When you uninstall package 1, the file has been considered modified, so NuGet leaves the file intact.

Viewing all articles
Browse latest Browse all 7612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>