Having different versions of a Nuget package on different projects may cause this problem as well. Make sure that all your packages have the same version:
- (Within Visual Studio) Right click on the solution
- Click on Manage Nuget packages for Solution
- Click on the Consolidate tab
- For every package in the Consolidate tab, update the package to the same version for every project.