I have a library of html helpers as a separate project. Right now it references system.web.mvc
of version 4.
If I try to use this library in a project that uses mvc3 it throws an error when a helper is attempted to be used:
Compiler Error Message: CS1705: Assembly 'MyHtmlHelpers, Version=3.7.4.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
I understand that I need to build my helpers project with system.web.mvc
of version 3 referenced in order for it to be compatible with mvc3 project. I do not want to have two projects with the same code with just the difference of system.web.mvc
referenced.
Question is in the title. Any help is appreciated.