I am getting the following error in my MVC project (running on .Net 4.6.1 framework);
Could not load type 'WebMarkupMin.Core.WebMarkupMinContext' from assembly 'WebMarkupMin.Core, Version=2.4.0.0, Culture=neutral, PublicKeyToken=99472178d266584b'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Could not load type 'WebMarkupMin.Core.WebMarkupMinContext' from assembly 'WebMarkupMin.Core, Version=2.4.0.0, Culture=neutral, PublicKeyToken=99472178d266584b'.
In my references I have version 2.4.0.0 referenced and in my packages .config I have;
<package id="WebMarkupMin.Core" version="2.4.0" targetFramework="net461" />
In the web.config root I have;
<dependentAssembly>
<assemblyIdentity name="WebMarkupMin.Core" publicKeyToken="99472178d266584b" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0" />
</dependentAssembly>
I have tried uninstalling and then reinstalling through nuget, which has not worked.
Any ideas what is causing this?