Exception: Found different versions of the same type

4 posts, 0 answers
  1. Azel
    Azel avatar
    2 posts
    Member since:
    Sep 2009

    Posted 25 Jun 2010 Link to this post

    I encounter the following Inner exception when trying to query for data:

    Found different versions of the same type 'ExperienceAttendanceSystem.Student'; only one can be supported.  
    Conflicting: file:///C:/Users/<userprofile>/AppData/Local/Temp/Temporary ASP.NET Files/root/7f4f6ad9/51a443ed/App_Code.79pup705.DLL  
    With: file:///C:/Users/<userprofile>/documents/visual studio 2010/Projects/ExperienceAttendanceSystem/ExperienceAttendanceSystem/bin/ExperienceAttendanceSystem.DLL  
    Make sure to reference only one version of a type. 


    My code is:

               IObjectScope scope = ObjectScopeProvider1.GetNewObjectScope();  
     
                try 
                {  
                    scope.Transaction.Begin();  
     
                    var student = from s in scope.Extent<Student>()  
                                  where s.Id == batchorid || s.Currentbatch == batchorid  
                                  select s;  
     
                   
                   
              
     
                    return student.ToList<Student>();  
                }  
                finally 
                {  
                    scope.Transaction.Commit();  
                } 

     
    I tried removing the cache but the exception still shows whenever I tried to compile at return student.ToList<Student>();

  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 28 Jun 2010 Link to this post

    Hello Azel,

    this is an error message when our runtime encounters two types with the same name. Ususally it indicates, that there are two versions of the logically same assembly are loaded into memory. For your case it should be sufficient to restart the ASP development server and rebuild your application.

    Kind regards,
    Thomas
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 18 Jul 2010 Link to this post

    I have a similar message, given below. The steps above did not work for me.  Since the problem involves the GAC, I tried removing the old version from the GAC, using the method at http://blogs.msdn.com/b/mossbiz/archive/2010/06/10/add-an-assembly-to-the-global-assembly-cache-on-windows-server-2008-r2.aspx, but was unable to make any changes at all to the GAC.

    Finally I uninstalled ORM and re-installed it.  This updated the copy in the GAC and solved the problem

    Message:
    System.Configuration.ConfigurationErrorsException:
    Found different versions of the same type 'Telerik.OpenAccess.RT.OID.SingleFieldIdentity'; only one can be supported.
    Conflicting: file:///E:/Documents/Visual Studio 2010/Projects/VgTest/VgTest.Web/bin/Telerik.OpenAccess.DLL
    With: file:///C:/Windows/assembly/GAC_MSIL/Telerik.OpenAccess/2010.1.623.5__7ce17eeaf1d59342/Telerik.OpenAccess.dll
  5. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 19 Jul 2010 Link to this post

    Hello James,

    We are glad to see that you have managed to solve this problem.
    If any other problems arise please contact us back.

    Kind regards,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top