Could not resolve type reference EntityFactoryCore2 after upgrading to v. 2.5 Final

Posts   
 
    
cwest
User
Posts: 29
Joined: 13-May-2007
# Posted on: 14-Jan-2008 07:35:25   

After upgrading to v. 2.5 Final I get the error:

"Could not resolve type reference : [SD.LLBLGen.Pro.ORMSupportClasses.Net20]SD.LLBLGen.Pro.ORMSupportClasses.EntityFactoryCore2"

This occurs when trying to create a unit test in VS 2008. Oddly, the app builds and runs without error in debug mode.

Additionally, I just built a release using a newly generated DAL. After installing the app on other computers, I'm encountering this error:

"Could not load file or assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

I ran a complete uninstall of the previous 2.5 version that I had installed then installed the latest Dec. 5th build. I also double checked all of my references to make sure they're pointed to the latest SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-Jan-2008 09:50:51   

Did you choose .NET 3.5 as your target platform when generating the code?

Maybe some of the files are not being properly overwritten. This may help you as well: http://llblgen.com/TinyForum/Messages.aspx?ThreadID=12262

Additionally, I just built a release using a newly generated DAL. After installing the app on other computers, I'm encountering this error:

"Could not load file or assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

Version=2.0.0.0..... your application must be referencing version 2.0 of the ORMSupportClasses somewhere. Could you please uninstall LLBLGen v.2.0, reinstall v.2.5, then regenerate the code and rebuild your application?

cwest
User
Posts: 29
Joined: 13-May-2007
# Posted on: 14-Jan-2008 10:25:02   

I was able to resolve the "EntityFactoryCore2" error by removing and re-adding the references to the ORMSupportClasses.

As for the deployment issue, I took the recommeded steps of uninstalling 2.0 and re-installing 2.5. I then regenerated the code and built a new installer. Unfortunately I'm still encountering the issue.

I double checked that the deployed ORMSupportClasses dll is version 2.5.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-Jan-2008 10:32:25   

I double checked that the deployed ORMSupportClasses dll is version 2.5.

I had no doubt about that, but the application is looking for v.2.0, which suggests that somewhere in your application a reference to v.2.0 still exists. Maybe an LLBLGenProDataSource if it is a web application. Or maybe you have an explicit Assembly redirection in the config file.

cwest
User
Posts: 29
Joined: 13-May-2007
# Posted on: 14-Jan-2008 17:29:02   

I don't have any explicit assembly redirection in the config file and it's not a web app. I've scoured my system for reminents of v.2.0, but haven't found anything.

I've also tried deleting the entire DAL projects that are generated and re-generating them with no luck. One point to note here is that I'm using VS2008 and the generated projects are converted - I really doubt that this has anything to do with it but I thought it would be worth a mention.

Also, I didn't have this problem when using the previous 2.5 build that I had installed on my system. Don't know if that helps but I'm grasping at straws here.

One last thing. The LLBL project was orginally created in 2.0.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 14-Jan-2008 19:09:13   

If after deployment your application still references 2.0 assemblies, there's one assembly in your application which references that version. This could be a DQE assembly which has the wrong version, or one of your application assemblies which got deployed which references the wrong version. Keep in mind that if you place things in the GAC, those assemblies are always read instead of a local dll by .NET 2.0+.

I'm not sure how much assemblies your application has, but you can check which assemblies are referenced in reflector.

On the machine which gives the error, start reflector and drag all application assemblies (the ones you build and the runtime libs (ORMSupportclasses and DQE) you use in the app's bin folder) onto reflector. It will now enlist these assemblies. Click open the [+] button and browse to 'References', then select the references to ORMSupportclasses and check if that's indeed v2.5 or v2.0 at the bottom of reflector.

Frans Bouma | Lead developer LLBLGen Pro
cwest
User
Posts: 29
Joined: 13-May-2007
# Posted on: 15-Jan-2008 00:00:14   

Thanks Otis. I was able to find the offending assembly using Reflector which allowed me to resolve the issue. smile