"a constructible type deriving from dbcontext could not be found in the selected file (ef power tools beta 3/visual studio 2012)" Code Answer


i have had this issue in the past. it comes when your context, "does too much" i left that comment deliberately vague. but you can generally narrow it down to your constructor code.

if the powertool cant easily instantiate your context due to constructor params or the constructor starts up power station, the tool gives up... there is no doubt a more technical analysis around parameter-less constructors but you will know enough to avoid. i use commented out vanilla constructor that i use for view generation purposes. then put it back when done for live work. ;-)

public class myfancydbcontext : dbcontext  {
   myfancydbcontext( what is here??? can ef powertool supply this ?){

     inside the constructor... do i start a power station ? any other issues
        preventing the create object  myfancydbcontent from succeeding ?   

edit: try the simple constructor that refers to a valid entry in app.config.

By Angelo Genovese on May 31 2022
Only authorized users can answer the Search term. Please sign in first, or register a free account.