Print Page | Close Window

6.1.1 Issues

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2776
Printed Date: 15-Oct-2025 at 7:15pm


Topic: 6.1.1 Issues
Posted By: gregweb
Subject: 6.1.1 Issues
Date Posted: 16-Jun-2011 at 5:22pm
I downloaded and installed 6.1.1 and then rebuilt the project.  After regenerating the EntityManagers, it comes up with this build error: Error 1 Type 'Jet.Models.EntityRelations' already defines a member called 'EntityRelations' with the same parameter types D:\Clients\Jet\Jet\Jet.Web\Models\EmailEntityManager.IB.Designer.cs 4969 12 Jet.Web
I think the issue is that I have two entity managers in the same namespace.  Thus after the codegen, there are two identical EntityRelation classes.
 
If I manually remove one of them, then it builds fine.
 
The second issue is that Global.asax comes up with the following error:
 
Error 1 The type or namespace name 'IdeaBlade' could not be found (are you missing a using directive or an assembly reference?) d:\Clients\Test\SilverlightApplication4\SilverlightApplication4Web\Global.asax 15 77 SilverlightApplication4Web
on this line:
 

System.Web.Hosting.

HostingEnvironment.RegisterVirtualPathProvider(new IdeaBlade.EntityModel.Web.ServiceVirtualPathProvider());

 
 
This occurs on my main project as well as a test projectthat I fired up to see if it produces the same issue.  IdeaBlade.EntityModel.Web is referenced in the project, so I don't understand why it wouldn't find it.
 
Greg
 
 
 



Replies:
Posted By: kimj
Date Posted: 16-Jun-2011 at 5:38pm
Regarding the first error - Did the problem occur after re-generating both models, or after re-generating one and then re-building?    With two EMs in the same namespace, you should see two partial EntityRelations classes in each generated IB.Designer file, but only one of them should have a constructor.   Now that you've manually removed one class, are you able to re-gen your models without a problem?
 
The problem in global.asax is probably due to the IdeaBlade.EntityModel.Web assembly not being found in the bin folder.  It's needed when the web application compiles.  Make sure the "Copy Local" setting is true when you build the project.


Posted By: gregweb
Date Posted: 16-Jun-2011 at 6:20pm
Thanks - second issue is resolved - set CopyLocal to true.
 
The first issue: It occurs after a rebuild of both EM's.
 
This is the line I have to remove:
 

 static EntityRelations() {}

If I remove that line, then it compiles.  But if the EM is regenerated, it comes back again.
Greg


Posted By: kimj
Date Posted: 16-Jun-2011 at 6:23pm
Do you have an EntityRelations constructor defined anywhere else in the project?  (At one time you may have needed to add one to work around a problem.)


Posted By: gregweb
Date Posted: 16-Jun-2011 at 6:56pm
I did a search, and the only place it is defined or used is in the designer files.  So no, it is not defined elsewhere.
 
Greg


Posted By: kimj
Date Posted: 17-Jun-2011 at 8:18am
I'm not able to reproduce the problem, so would you be willing to send us the 2 edmx and tt files, along with just the csproj file? You can zip and email to me, kimj @ ... Thanks!


Posted By: gregweb
Date Posted: 17-Jun-2011 at 1:08pm
This was just sent.
 
Greg



Print Page | Close Window