I want my unit test project to use System.Web.MVC version 4.0.0.0 always, if any of the referenced assemblies are using earlier versions..
I know how we do it in web.config.
But when I am doing following in app.config of my unit test project, it still doesn’t work:
Assembly binding is the same as in your web.config. The issue is whether or not it is naming the .config file correctly and copying it to the output path.
Check the output path to see if it’s translating
App.configtoYourDllNameHere.dll.configand copying it there. If not, you may need to rename the file toYourDllNameHere.dll.configin the project, and in properties, set the “Copy to Output Directory” to “Always”.