Thursday, October 24, 2013

// // 1 comment

Enable-Migrations Error

Ran into an error earlier regarding enable-migrations. In the past is has worked perfectly, but suddenly it seemed to barf all over my screen in red paint like so - Argh, My Eyes!!

PM> Enable-Migrations
Exception calling "BuildProject" with "3" argument(s): "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
At D:\development\Dev-Training\TaxMate\packages\EntityFramework.6.0.1\tools\EntityFramework.psm1:866 char:45
+     $DTE.Solution.SolutionBuild.BuildProject <<<< ($configuration, $project.UniqueName, $true)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

Get-Package : Cannot validate argument on parameter 'ProjectName'. The argument is null or empty. Supply an argument that is not null or empty and then try the command again.
At D:\development\Dev-Training\TaxMate\packages\EntityFramework.6.0.1\tools\EntityFramework.psm1:878 char:40
+     $package = Get-Package -ProjectName <<<<  $project.FullName | ?{ $_.Id -eq 'EntityFramework' }
    + CategoryInfo          : InvalidData: (:) [Get-Package], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,NuGet.PowerShell.Commands.GetPackageCommand


Turns out, it was a simple case of the default project not being selected because I had deleted the start-up project


1 comment: