MySQL Error, The type initializer for 'SD.LLBLGen.Pro.ORMSupportClasses. DependencyInjectionInfoProviderSingleton' threw an exception.

Posts   
 
    
iDave avatar
iDave
User
Posts: 67
Joined: 14-Jun-2010
# Posted on: 08-Feb-2011 08:12:53   

Hallo,

I'm just testing the latest and greatest version of LLBLGen Pro (3.1) and I'm getting the following error:

Note: I'm using MySQL 5.1 with latest version of Devart dotConnect for MySQL on Windows 7 and .NET 4.0


MySQL Error, The type initializer for 'SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionInfoProviderSingleton' threw an exception.; 
   at SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionInfoProviderSingleton.PerformDependencyInjection(Object injectionTarget)
   at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.PerformDependencyInjection() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\EntityBase2.cs:line 2349
   at Test.DAL.EntityClasses.StaffEntity.InitClassMembers() in C:\Users\Dave\Documents\Visual Studio 2010\Projects\Test.DAL\DatabaseGeneric\EntityClasses\StaffEntity.cs:line 784
   at EasyRental.DAL.EntityClasses.StaffEntity.InitClassEmpty(IValidator validator, IEntityFields2 fields) in C:\Users\Dave\Documents\Visual Studio 2010\Projects\Test.DAL\DatabaseGeneric\EntityClasses\StaffEntity.cs:line 1087
   at Test.DAL.EntityClasses.StaffEntity..ctor() in C:\Users\Dave\Documents\Visual Studio 2010\Projects\Test.DAL\DatabaseGeneric\EntityClasses\StaffEntity.cs:line 101
   at Test.Identity.LoginHelper.Login(String username, String password, String conn) in C:\Users\Dave\Documents\Visual Studio 2010\Projects\Test.LoginHelper\LoginHelper.cs:line 76
   at Test.frmUserLogin.UserLogin() in C:\Users\Dave\Documents\Visual Studio 2010\Projects\Test\frmUserLogin.cs:line 156

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 08-Feb-2011 08:39:29   

What are you using the DI for? Would you please post the application config file, and the Dynamically Injected class code?

iDave avatar
iDave
User
Posts: 67
Joined: 14-Jun-2010
# Posted on: 08-Feb-2011 09:01:33   

Walaa wrote:

What are you using the DI for? Would you please post the application config file, and the Dynamically Injected class code?

I'm testing an application using Authorization... anyway, I found the problem. The app.config is pointing to an old version in the sample provided in the web page "Authorization example for Winforms".


<section name="dependencyInjectionInformation" type="SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionSectionHandler, SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27"/>

Should be:


<section name="dependencyInjectionInformation" type="SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionSectionHandler, SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27"/>

Thanks Walaa for your kind help.

morrisb
User
Posts: 13
Joined: 24-Jun-2008
# Posted on: 09-Feb-2011 16:04:23   

Good catch! Got me too...

Nightowl33
User
Posts: 8
Joined: 31-Mar-2009
# Posted on: 10-Feb-2011 17:44:53   

And me. Should also update the 3.1 documentation, which is also incorrectly pointing to the 3.0.0.0 version. Section is "Generated code - Setting up and using Dependency Injection".

Thanks!

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 10-Feb-2011 21:18:49   

Thanks - I'll get the dev team to update the relevant items.

Matt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 10-Feb-2011 22:42:49   

Nightowl33 wrote:

And me. Should also update the 3.1 documentation, which is also incorrectly pointing to the 3.0.0.0 version. Section is "Generated code - Setting up and using Dependency Injection".
Thanks!

Hmm. We did search for 3.0 in the docs to change it into 3.1 disappointed ... Will fix that tomorrow.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 11-Feb-2011 11:35:55   

Done. Updated all examples, and docs.

Frans Bouma | Lead developer LLBLGen Pro