Cannot Set LLBLGenDataSource EntityCollectionTypeName Property

Posts   
 
    
bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 18-Feb-2008 19:16:29   

Hi all,

I am developing an ASP.NET app. using LLBLGen data access layer. The problem is, when I try to use LLBLGenDatasource (v 2.5), and open its "Configure Data Source" wizard, "Entity collection to select" drop down list is empty!

If I try to write EntityCollectionTypeName property manually, it was deleting the property after leaving the property cell, but once I rebuilted and re-opened the solution, when I set the property, the data source started to give error below:

Could not load file or assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=2.5.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 am entering value of EntityCollectionTypeName property correctly as shown on references:

MyProjectPersistence.CollectionClasses.TestCollection, MyProjPersistence

What is the problem?

Regards Baris

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 19-Feb-2008 01:48:28   

try adding the ORMSupportClasses dll to your UI project reference.

bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 19-Feb-2008 10:04:16   

Thank you for the response,

I added the assembly reference, rebuilded the solution, restarted VS, and rebuilded the solution again. But the error message still exists:

Could not load file or assembly 'SD.LLBLGen.Pro.ORMSupportClasses.NET20, Version=2.5.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 have both versions (2.0 and 2.5) installed on my PC. Is this a problem?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 19-Feb-2008 10:56:04   

Please make sure that the SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll referenced in your project matches the one used in the toolbox for the (LLBLGenProDataSource). They should be of the same version, and build if possible.

Most probably in the application you have referenced v.2.0 not 2.5.

bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 19-Feb-2008 12:39:20   

Thank you for the response.

I checked all references again and again. All of the referenced dlls are "v 2.5" including the LLBLGen datasource control version. Something is wrong.

bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 19-Feb-2008 13:40:36   

I removed v2.0 but the error still exists.

bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 19-Feb-2008 14:04:29   

I created a new lgp file, re generated data access project into a new solution. Afterwards, I created a new web site project in to the solution, set the project references and tried to set the property again. Unfortunately the same error message appears. Any idea?

goose avatar
goose
User
Posts: 392
Joined: 06-Aug-2007
# Posted on: 19-Feb-2008 14:58:12   

Ok, this may sound extreme but, try uninstalling llblgen (both versions) and then install 2.5 and then recreate and regenerate the whole thing. This is the only I solution I can think about right now due this error is very unusual.

bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 19-Feb-2008 17:50:41   

Hi,

I removed both of the versions, and installed v 2.5 again, then I created and generated everything again!

Result was: fiasco!

simple_smile

I uninstalled v2.5 and installed v2.0, and I performed same procedure for that version and the datasource worked well.

I reserved another development PC from our PC pool which have both of the versions installed already. I performed same things again, and it worked well again!

The problem is on my own PC. I plan to uninstall and install VS again! Ok... We found the problematic thing. But what is the cause of the problem? And how can i resolve the problem without re-installing VS? Any idea?

That problem wasted my whole day. And therefore, I wonder the source of the problem.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Feb-2008 10:25:47   

The problem is on my own PC. I plan to uninstall and install VS again! Ok... We found the problematic thing. But what is the cause of the problem? And how can i resolve the problem without re-installing VS? Any idea?

Try to remove the LLBLGenProDataSource instances from the toolbox, and then close VS, re-open it again and re-add them to the toolbox from the v.2.5 of the ORMSupport.. dll

bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 21-Feb-2008 13:00:51   

I have already tried the suggested solution many times before. Unfortunately, I converted lgp file and data access layer to v 2.0. Because I do not have enough time to reinstall VS besides, that effort is not a guaranteed solution.

I have a related question here. Is there a tool to convert v 2.5 lgp files to v 2.0? I recreated the lgp. I was lucky to not to have many complicated typed lists on the lgp...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39906
Joined: 17-Aug-2003
# Posted on: 21-Feb-2008 14:46:24   

I'm confused: what problem is exactly blocking you from using v2.5? VS.NET 2005? Did you install VS.NET 2005 SP1? Converting back to v2.0 isn't possible as the format of the project changed.

Though converting back isn't really solving anything in the datasource control department, as the main code is the same between v2.0 and v2.5 regarding these classes.

Frans Bouma | Lead developer LLBLGen Pro
bargizey
User
Posts: 10
Joined: 18-Dec-2007
# Posted on: 21-Feb-2008 15:33:49   

Hi Otis,

I have a aspx page with tons of bound controls. The easiest way of binding is using a binding control. The most important comfort of using data sources is being able to set binding expressions of bound controls. If I cannot use binding source then I have to set these binding expressions manually on aspx source view. That was my first aspx page on the current project. Think more and more aspx pages to be designed.

I do not know cause of the problem, but I am facing an actual problem of using v 2.5 datasource. I ofcourse have installed the servicepack.

Most probably, when I try to use the new datasource, VS ide is trying to get related assembly from somewhere (e.g. cache) different from the data access layer. If I re-install VS 2005 the problem most probably will be solved. Bu I do not have enough time for experiments such that nowadays.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39906
Joined: 17-Aug-2003
# Posted on: 21-Feb-2008 18:35:06   

Understandable. It's a big pain sometimes, this issue...

I'll go back to the exception you reported in the first post. There, it seems that one or more projects in your solution references the v2.0 ormsupportclasses assembly. Be sure that the version registered in the web.config file is the same one as you have referenced in your solution otherwise you'll run into problems. As you have both versions of llblgen pro, it might be that one project still references v2.0's version of ORMSupportclasses. In the web.config it's likely a tag reference is made, which could contain the version number as well.

In the bin folder of your webapplication, be sure there's no 'refresh' file which refreshes the v2.0 version. Also, be sure to copy-local at least one ormsupportclasses dll in your solution, otherwise you'll be using the one in the binfolder, which might be the v2.0 one simple_smile

Could you verify these things for me please?

Frans Bouma | Lead developer LLBLGen Pro