I have a dependency on specific nuget package. When I update my solution to use new package version and commit/push solution to remote GIT repository, other contributors to solution, after pull, are still using old DLL version of nuget package, even though package-restore is activated. However, when they open CSPROJ file, it shows that reference should be to the new version. Basically Visual Studio is not generating any warning/error if there is a mismatch between used DLL from bin/obj folder and referenced DLL in csproj file. To be more concise:
- Solution uses DLL version 0.5
- I upgrade via Nuget to DLL version 0.6
- My Visual Studio shows that version 0.6 is used
- I commit/push solution to GIT
- Another colleague pulls solution from GIT
- His Visual Studio shows DLL version 0.5, there is no error/warning
- His CSPROJ file references DLL version 0.6
- Solution fails on runtime as there is change in internal implementation
How do we fix this:
- Colleague deletes his bin/obj
- Visual Studio notices that DLL's are missing
- He uses Manage Nuget Packages on solution level and just clicks OK, nothing else
- Nuget downloads DLL's and issue is solved
Now this is really stupid workaround and in my opinion this should be automated. Is there anything that we might be doing wrong that is causing this to happen?