Possible bug in 5.4.3 (20180810)

Posts   
 
    
Posts: 37
Joined: 09-Nov-2016
# Posted on: 14-Aug-2018 13:24:44   

Hi,

I just installed 5.4.3 Hotfix build (20180810) and after generating code to a LLBLGen Runtime Pro Framework .NET Standard 2.0 project I am getting a compile error. I installed the newest version of LLBLGen, generated the code (without making any changes to the project) and the error appeared.

It is specific to the EntityFactories.cs file. I have compared the before and after (before is the working code generated by 5.4.1) and the relevant change seems to be this:

The following is added


/// <inheritdoc/> 
protected override Type ForEntityType { get { return typeof(TEntity); } } 

and produces a "'EntityFactoryBase2<TEntity>.ForEntityType': no suitable method found to override"

And the following is changed from:


 _factoryPerType.Add(factory.Create().GetType(), factory); 

to:


_factoryPerType.Add(factory.ForEntityType ?? factory.Create().GetType(), factory); 

and produces a "'IEntityFactory2' does not contain a definition for 'ForEntityType' and no extension method 'ForEntityType' accepting a first argument of type 'IEntityFactory2' could be found (are you missing a using directive or an assembly reference?)"

Reverting all changes and installing 5.4.2 allows me to generate code again.

Best regards, Andreas

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Aug-2018 15:35:50   

You have to update the runtime libraries as well. There's a bugfix in the generated code, but it required a change in the runtimes. As both are released at the same time, we took the change and released it now.

So if you reference dlls on nuget, be sure to reference the latest 5.4.3 hotfix build for the ormsupportclasses. If you do so and still run into this issue, please let us know.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 37
Joined: 09-Nov-2016
# Posted on: 14-Aug-2018 17:52:44   

Argh! I forgot to update them. It worked, thank you!