Page 1 of 1

DatabaseFactory.CreateDatabase() fails

Posted: Mon 26 Oct 2009 04:47
by Platypus
I am using VS2008 with MS enterprise library 1.1 with a target framework of 2.0 and am having a problem with the the call to DatabaseFactory.CreateDatabase(). Although elsewhere in this site it suggests that only the app.config file is required, when I use only this file it fails with a dataconfiguration section not found. I have instead used an app.config and a dataConfiguration.config file to setup the database information required. This works until the create database call at which stage the following error occurrs:-

{"Could not load file or assembly 'Devart.Data, Version=5.40.42.0, Culture=neutral, PublicKeyToken=09af7300eec23701' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Devart.Data, Version=5.40.42.0, Culture=neutral, PublicKeyToken=09af7300eec23701"}

Can someone please explain what is required to correct this, thanks.

The app.config is

Code: Select all

  
    
  
  
    
      
        
        
          
        
      
    
    
    
  
The dataconfiguration.config is

Code: Select all


  
    
      
        
        
        
      
      
        
        
      
      
        
          
            
            
            
            
            
          
        
        
          
            
            
            
            
            
          
        
       
    
  

Posted: Wed 28 Oct 2009 11:48
by Shalex
1. Try rebuilding Devart.Data.MySql.EnterpriseLibrary.dll by compiling \Program Files\Devart\dotConnect\MySQL\Enterprise Library\src\CS\Devart.Data.MySql.EnterpriseLibrary.8.sln .
2. Please put the dataConfiguration section to your app.config file as it is described in our sample in \Program Files\Devart\dotConnect\MySQL\Enterprise Library\DataAccessQuickStart\CS\App.config .
3. Tell us your current version of dotConnect for MySQL. You can learn it from the Tools | MySQL | About menu of Visual Studio.
4. Please check our provider registration in \WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config . If you current version is 5.40.42, the corresponding entry should be the following:

Code: Select all

  
    
  
5. Make sure that Devart.Data.dll is available in GAC or in the bin folder of your application.

Posted: Thu 29 Oct 2009 04:13
by Platypus
Points 4 & 5 are already okay and the version is 5.40.42.0.
Point 1 is the problem. I do not have the enterprise library folder present on my machine. I have reinstalled Devart dotConnect for MySQL Standard with full installation but still no enterprise library folder. I have these folders under MySQL:

Code: Select all

C:\Program Files\Devart\dotConnect\MySQL\Doc
C:\Program Files\Devart\dotConnect\MySQL\HTTP
C:\Program Files\Devart\dotConnect\MySQL\Samples
C:\Program Files\Devart\dotConnect\MySQL\Uninstall
How do I get the source files you are referring to?
Thanks

Posted: Thu 29 Oct 2009 08:18
by Shalex
Please refer to the dotConnect for MySQL editions matrix available at http://www.devart.com/dotconnect/mysql/editions.html . Please note that Enterprise Library is supported in the Professional and Developer editions only. Probably, you have Standard Edition. You can check this in the Tools | MySQL | About menu of Visual Studio.

Posted: Fri 30 Oct 2009 04:31
by Platypus
I have ordered an upgrade to the professional version. Will see how that works out. The link to the enterprise library feature from the editions page is broken & perhaps that is why I didn't bother to order it in the first place. Thanks

Posted: Wed 04 Nov 2009 08:22
by Platypus
I have installed the professional version but it has highlighted other problems. I think that upgrading from .Net 1.1 to 2 or more requires me to change a lot of source code for this to work correctly, something I don't have time to do at present.