I\'m having another of these \"Could not load file or assembly or one of its dependencies\" problems.
Additional information: Could not load file or
Thanks Riddhi M. Following worked for me.
Remove Temporary Files C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files Close VSTS and Open Again Remove and Add the same DLLs (Note: you add the same matching versions)
Juntos answer is correct but you should also consider:
For the unity v2.1.505.2 different AssemblyVersion and AssemblyFileVersion attributes are specified:
AssemblyFileVersion is used by the NuGet but CLR does not care about it! CLR is going to use only AssemblyVersion!
So your redirects should be applied to a version that specified in AssemblyVersion attribute. So 2.1.505.0 should be used
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.505.0" newVersion="2.1.505.0" />
</dependentAssembly>
</assemblyBinding>
See also: What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?
You say you have a lot of projects in your solution ... well, start with one near the top of the build order. Get that one to build and once you figure it out you can apply the same fix to the rest of them.
Honestly, you probably just need to refresh your reference. It sounds like you either updated your version and didn't update the references, or it's a relative path issue if you keep your solution in source control. Just verify your assumptions, and re-add the reference.
Try to clean Debug and Release folders in your solution. Then remove and add unity again.
Following worked for me.