New Posts New Posts RSS Feed: Unable to locate edmx for code generation
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Unable to locate edmx for code generation

 Post Reply Post Reply
Author
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Topic: Unable to locate edmx for code generation
    Posted: 26-May-2010 at 5:39pm
Hmm.  Not sure why we're getting different behavior.
 
However, we have this fixed so that the DevForce files will be generated in the same folder as the edmx.  This will be in the upcoming release scheduled for the week of June 7.
 
Back to Top
jmpinchot View Drop Down
Newbie
Newbie
Avatar

Joined: 07-May-2010
Location: Florida
Posts: 22
Post Options Post Options   Quote jmpinchot Quote  Post ReplyReply Direct Link To This Post Posted: 26-May-2010 at 11:50am
I've recently come back to this issue, having put it on the back burner since most of our tables aren't mapped yet anyway. But even after dragging both the .edmx and .edmx.tt (as well as the .ReadMe file) into the a sub folder or a sub folder two levels down, this problem persists.

I've even tried to create a second separate model assembly and start from scratch, but haven't gotten it to work properly.
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 15-May-2010 at 12:08am
Hmm, when I dragged the .edmx and .edmx.tt into the subfolder and ran code generation everything was put in the right place.  Only if I delete the .edmx.tt file did it get regenerated in the wrong location.
 
I have filed a bug/feature request to generate the .edmx.tt file into the same physical location as the .edmx file.
 
Thanks for pointing this out.
 
Back to Top
jmpinchot View Drop Down
Newbie
Newbie
Avatar

Joined: 07-May-2010
Location: Florida
Posts: 22
Post Options Post Options   Quote jmpinchot Quote  Post ReplyReply Direct Link To This Post Posted: 12-May-2010 at 12:24pm
In my project, I'm using a separate model project. Within that separate project, I have three edmx files in sub-folders:

Models\Core\Core.edmx
Models\History\History.edmx
Models\Reporting\Reporting.edmx

When I attempt to run code generation, the edmx.tt files get placed in the root directory (instead of at the same level as the edmx files), and I get the following error:

Running transformation: IdeaBlade.VisualStudio.OM.OMException: Unable to locate file: Core.edmx
   at IdeaBlade.VisualStudio.OM.CodeGenerator.DomainModelTemplate.Generate()
   at Microsoft.VisualStudio.TextTemplating042B1605D3195C70063A125D242888F8.GeneratedTextTransformation.TransformText() in d:\eCustody2_0\Development\Source\eCustody\Data.Web\Core.edmx.tt:line 16
   at Microsoft.VisualStudio.TextTemplating.TransformationRunner.RunTransformation(TemplateProcessingSession session, String source, ITextTemplatingEngineHost host, String& result) 


Moving the edmx.tt file to the correct subdirectory and attempting to rebuild generates that same error.

If I move the edmx and the edmx.tt files out to the root directory and build everything works fine, but this is really a sub-optimal solution for us because it will involve moving a large number of files around everytime we add a new table, or need to regenerate the code. How can I keep the edmx and edmx.tt files in their proper sub-directory and successfully run the code generator; hopefully keeping the developer class files in the appropriate sub-directories as well?

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down