Programming By A Tool ANDRE SMASH!!!!



17Jul/090

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

- Sean

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=3.5.0.0

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=3.5.0.0, 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.

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

No more problems.

Related Posts
Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.

NetDevInc.com