New Posts New Posts RSS Feed: Runtime Error
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Runtime Error

 Post Reply Post Reply
Author
Sakar SR View Drop Down
Newbie
Newbie
Avatar

Joined: 21-Jul-2010
Location: India
Posts: 39
Post Options Post Options   Quote Sakar SR Quote  Post ReplyReply Direct Link To This Post Topic: Runtime Error
    Posted: 23-Feb-2012 at 9:19pm
runtime error error, when i run this code

 public static SysUser GetUser(EntityManager pManager, string pUserName)
        {
            //SysUser aUser = null;
            var mgr = new  eFilerDBEntities(pManager);
            SysUser aUser = mgr.SysUsers.Where(p => p.UserName == pUserName).FirstOrNullEntity();            
           
            return aUser;
        }

Error :

  Message=Key 'eFilerDBEntities': Key 'eFilerDBEntities': Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
  Source=IdeaBlade.EntityModel
  Cancelled=false
 


Back to Top
Sakar SR View Drop Down
Newbie
Newbie
Avatar

Joined: 21-Jul-2010
Location: India
Posts: 39
Post Options Post Options   Quote Sakar SR Quote  Post ReplyReply Direct Link To This Post Posted: 24-Feb-2012 at 5:50am
Solved the proplem

Add this in app.config file to solve .net 2 complied assembly  in .Net 4

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down