WHAT'S NEW?
Loading...

Downgrade NuGet package and dependecies in multiple projects

Introduction


Today I had a problem with a NuGet package which was updated and it made my solution stop working for some weird compatibility problems. I decide to downgrade the package to revert the package to its original version but the Package Manager Console didn't help.


Researching in "The Internet" I found Marcelo Volmaro's blog which contains a post about how to fix this issue. He uses some power shell command through the Package Manager console to fix it. I recommend to go his blog (see references) and take a look.

Here is my script which I used to revert my SimpleInjector from version 3 to version 2.8.3. I've made some adjustments to get it working. This particular nuget package comes with other dependencies you have to downgrade too, that's why my script is a bit longer compared with Marcelo's, although, I think the script can be improved.



References

http://www.extremefx.com.ar/blog/downgrading-a-nuget-package
http://jameschambers.com/2011/06/powershell-script-examples-for-nuget-packages/
https://technet.microsoft.com/en-us/library/ee177028.aspx
https://simpleinjector.org/index.html
https://docs.nuget.org/consume/package-manager-console

0 comments:

Post a Comment