Error starting project related to Entity Framework in Package Manager console

This error has puzzled me over the past few days and cannot find a little information about it on Google. It started the other day when I was assigned a new laptop for work, and I essentially run it on a clean installation of Windows 7 x64 with the VS2012 update.

Whenever I run a project using Entity Framework 5 or 6-alpha, this exception gets to the package manager console:

New-Object : Cannot find an overload for "Version" and the argument count: "2".
At <project path>\packages\EntityFramework.5.0.0\tools\in
it.ps1:5 char:46
+ if ($PSVersionTable.PSVersion -ge (New-Object <<<<  Version @( 3, 0 )))
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Test-ModuleManifest : Invalid Module Manifest path '<project path>
\packages\EntityFramework.5.0.0\tools\'. The path argument must resolve to a single file in the file system with a '
.psd1' extension. Please fix the path specification and try again.
At <project path>\packages\EntityFramework.5.0.0\tools\in
it.ps1:14 char:34
+ $thisModule = Test-ModuleManifest <<<<  (Join-Path $toolsPath $thisModuleManifest)
    + CategoryInfo          : InvalidArgument: (C:\Users\stephe...rk.5.0.0\tools\:String) [Test-ModuleManifest], InvalidOper 
   ationException
    + FullyQualifiedErrorId : Modules_InvalidModuleManifestPath,Microsoft.PowerShell.Commands.TestModuleManifestCommand

Import-Module : Cannot bind argument to parameter 'Name' because it is null.
At <project path>\packages\EntityFramework.5.0.0\tools\in
it.ps1:31 char:18
+     Import-Module <<<<  $thisModule
    + CategoryInfo          : InvalidData: (:) [Import-Module], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ImportModuleComma 
   nd

I can get rid of this error by editing the package scripts manually, but it seems like this would be the wrong approach. There are also several instances checking the Powershell version this way, so I suspect that this is not the case with the configuration of my computers.

ASP.NET MVC 4 .NET 4.5. - Entity Framework, Enable-Migrations Update-Database. .

+5
1

- , , PowerShell 3.0. , , , .

+2

All Articles