Mvc Master Page: System.Data.Entity Must Be Referenced

Ok maybe you’re better at figuring out the obvious than I am, but this was annoying me. On my master page I happened to be using an object from another assembly that used the Entity Framework. Now by habit, I have this assembly:

System.Data.Entity, Version=

Referenced to the UI project, so it was a little of a surpise to me that I was getting this error on the master page. (And the views, but I don’t use anything in Views not supplied by Models) I was at a loss as to how to get the thing to work.

Now I could use this:

<%@ Assembly Name=”System.Data.Entity, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089%>

On the page, but would be silly to do that all the thing, and DUH in WebForms… or ASP.Net Classic, is to put it in the stupid web config.

      <add assembly="System.Data.Entity, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

No more problems.