On the whole Visual Studio is a great software development tool with a relatively low number of annoying bugs. However, there is one annoying bug that Microsoft doesn’t seem to be bothered enough to fix…
The problem happens if you remove and re-add a file reference to a DLL. When you re-add the reference (same file name in a different folder) by browsing to a different file location, Visual Studio will for some reason insist on using the previous file path to the DLL and not the new one!!!
You can find some more information about the problem here.
We were trying to change a reference’s path by removing and re-add it but it just didn’t work due to this bug!
So how can we get around this problem? Well one way is to change the reference path directly by editing the project file.
To do this, right click on the project in the solution explorer and choose ‘Unload Project.’ Once the project is unloaded, right-click on it again and then choose ‘Edit’, the project’s XML will be displayed in the editor.
Now search for references to the incorrect reference path and change it to your new path. To do this, look near the following elements:
Finally, right-click on the project again and choose ‘Reload Project’ – check that the references are correct….
I hope this helps someone, it was the only way we could figure out how to get around the problem…