New Posts New Posts RSS Feed: How-To: Disable DevForce Code Generation
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How-To: Disable DevForce 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: How-To: Disable DevForce Code Generation
    Posted: 11-Jun-2010 at 6:39pm
Already done ;).  In DevForce 6.0.3 the property sheet for the edmx has a setting called "DevForce Enabled" which you can toggle on or off.
Back to Top
fjrodriguezcom View Drop Down
Newbie
Newbie


Joined: 11-Jun-2010
Posts: 1
Post Options Post Options   Quote fjrodriguezcom Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jun-2010 at 3:31am
+1
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: 22-Apr-2010 at 4:56pm
Ok, this is being implemented.  In the next release, we will allow you to control DevForce code generation on a per EDMX basis.
 


Edited by ting - 23-Apr-2010 at 3:43pm
Back to Top
rallman View Drop Down
Newbie
Newbie


Joined: 20-Apr-2010
Posts: 5
Post Options Post Options   Quote rallman Quote  Post ReplyReply Direct Link To This Post Posted: 20-Apr-2010 at 4:09pm
Just to be clear. Every time I make a change and save an edmx file, I must: Remove the '<RemoveToRestore>', delete the .tt structure, and remove the IdeaBlade references?
 
I would like to add a +1 to the feature request to switch between EF and DF per project (and default existing projects to EF). At this point I am only evaluating DevForce but doing real work in EF so it is quite intrusive.
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: 20-Apr-2010 at 4:03pm
At the moment, those are the only two options, disabling it globally with the Extension Manager or removing the prefix.  We have a feature request to find a better way to switch between DevForce and raw EF on a per project basis.
Back to Top
rallman View Drop Down
Newbie
Newbie


Joined: 20-Apr-2010
Posts: 5
Post Options Post Options   Quote rallman Quote  Post ReplyReply Direct Link To This Post Posted: 20-Apr-2010 at 3:45pm
Thanks for the quick reply.
 
My readme file does not describe how to disable the DevForce templates and every time I remove the '<RemoveToRestore>' prefix, it gets added back when the edmx is saved. Also, the .tt structure and IdeaBlade references get recreated. This was an exting edmx file in an existing project. As this is not a DevForce project I do not want any references to DevForce assemblies.
 
Can this be done?
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 20-Apr-2010 at 3:28pm
This is from the Business Object Mapping section of the Learning Resources:
 
When an EDMX file is saved for the first time a new project item will be added to the project containing the EDMX file.  This project item will have the same name as the EDMX file but with a further ‘.tt’ extension.   Several additional files will be generated ‘under’ this project item.  One of these will be a ‘ReadMe’ file that explains in more detail how to customize template generation.  The other files will have an ‘.IB.Designer’ extension and will contain the DevForce generated code.  Feel free to inspect these files but do not modify them because they will be regenerated each time the EDMX file changes.  In most cases there will only be a single such file, but there are options described later to allow the generated code to span multiple files. 
 
One further side effect of this operation is to ‘turn off’ the standard Entity Framework code generation mechanism.  DevForce does this by modifying the ‘Custom Tool’ property associated with the ‘EDMX’ file by adding a ‘<RemoveToRestore>’ prefix  to the custom tool name specified there.  (At any time this prefix may be removed to restore the standard Entity Framework code generation.  It is usually a good idea to remove the DevForce ‘.tt’ file, and its underlying children, after this is done to avoid conflicts.) 
Back to Top
rallman View Drop Down
Newbie
Newbie


Joined: 20-Apr-2010
Posts: 5
Post Options Post Options   Quote rallman Quote  Post ReplyReply Direct Link To This Post Posted: 20-Apr-2010 at 3:11pm
DevForce 2010 has taken over code generation on my existing EF projects. Besides using the Extension Manager of Visual Studio to disable for all projects, how can I disable on a per project/solution basis?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down