Print Page | Close Window

Runtime Error

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3293
Printed Date: 05-May-2024 at 4:10am


Topic: Runtime Error
Posted By: Sakar SR
Subject: Runtime Error
Date 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
 





Replies:
Posted By: Sakar SR
Date 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>





Print Page | Close Window