I am having the following problem, I am adding a reference for a DLL, System.Data.SQLite to be specific to a C# program, that when added is correctly added as version 4.0.30319, and my program runs perfectly.
However when I save my work and close visual studio, the next time I open the project visual studio now identifies the version as v2.0.50727, even though the DLL has not changed in any way, and as such my program will not run until I remove the references and re-add them.
I dont know why visual studio (2010) is doing this but does anyone know how to stop it?
Make sure that you have "Use specific version" property set to "true" in referenced assembly properties.
Probably VS is picking SQLite version from GAC when it is restarted.