I got this error because I had an extra
<ItemGroup> <Reference Include="Newtonsoft.Json"> <HintPath>..\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="Owin"> <HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath> <Private>True</Private> </Reference> </ItemGroup>
in my Web.csproj directly below regular links that already contain the correct link to the latest version of Newtonsoft.Json.dll. In VS, only a link to the new assembly was shown.
The solution was: I moved the valid Owin link to the main ItemGroup links and deleted the obsolete Newtonsoft.Json.dll link (manually edited the csproj file).
Cause of error message: On my machine, the HintPath from the old Newtonsoft.Json.dll does not exist, so MSBuild looked elsewhere and took the version of Blend.
(By the way: in order to find out why and where MSBuild is looking for a specific assembly, use TOOLS → Options → Projects and Solutions → Build and Run → and set the Output Size of the MSBuild Project Assembly to Details, and rebuild the project.)
source share