Answered Entity Framework Migrations Issue

  • Tuesday, March 06, 2012 10:25 PM
     
      Has Code

    I'm having an issue with EF Migrations, specifically with getting the "Enable-Migrations" command to work.  When I execute the command in the Package Manager Console I receive the following error:

        System.Management.Automation.PSArgumentException: Cannot find type System.Data.Entity.Migrations.MigrationsCommands]: make sure the assembly containing this type is loaded.
        at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
        Cannot find type [System.Data.Entity.Migrations.MigrationsCommands]: make sure the assembly containing this type is loaded.

    It seems to me that the NuGet console can't find the MigrationsCommands type from my EF assembly.  I've checked and the assembly is the most recent one (4.3.1), and from within object browser I am unable to find the MigrationsCommands type or namespace.  Anyway, any help on this would be greatly appreciated!

    Also, I have already checked both projects in my solution (it is a test solution simply to resolve the issue I am having).

    UPDATE: I still do not have a resolution, but it looks like the source of the issue is in the following output when I run the "Install-Package EntityFramework" command within the Package Manager Console. The error is here:

    Unable to find type [ConnectionFactoryConfiguratorInvoker]: make sure that the assembly containing this type is loaded. 
    At C:\...\packages\EntityFramework.4.3.1\tools\install.ps1:36 char:39
    + [ConnectionFactoryConfiguratorInvoker] <<<< ::Invoke((Join-Path $toolsPath "EntityFramework.PowerShell.dll"), $project)
    + CategoryInfo : InvalidOperation: (ConnectionFactoryConfiguratorInvoker:String) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound


    • Edited by jdscolam Wednesday, March 07, 2012 7:16 PM Additional information
    •  

All Replies

  • Wednesday, March 07, 2012 8:35 AM
    Moderator
     
     

    Hi jdscolam,

    Welcome!

    Do you mean you have solved the problem by recreating a simply project, right? 

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Wednesday, March 07, 2012 3:07 PM
     
     

    Hi Chen,

    No, I mean I have a simple solution with two projects that re-creates the problem.  So even in a simple case I am still having the issue.  I have used the package management console pointed to both projects and both projects have the issue.

    Any ideas?

  • Wednesday, March 07, 2012 7:16 PM
     
     
    I have updated the original post with further information.
    • Marked As Answer by jdscolam Wednesday, March 07, 2012 8:21 PM
    • Unmarked As Answer by jdscolam Wednesday, March 07, 2012 8:21 PM
    •  
  • Wednesday, March 07, 2012 8:21 PM
     
     Answered
    After several hours of searching I have found the solution.  They key is located Here in Phil Haack's response to "Chris" regarding Reflector 6.5.  I had Reflector installed (version 7.0 curiously enough) and the Reflector Add-On enabled within VS2010.  Upon researching the NuGet FAQ I uninstalled Reflector and disabled the VS2010 Add-In.  This seems to have resolved the issue as I can now both "Install-Package EntityFramework" and "Enable-Migrations" without issue.
    • Marked As Answer by jdscolam Wednesday, March 07, 2012 8:21 PM
    •