Created
April 19, 2012 15:31
-
-
Save robertgreiner/2421752 to your computer and use it in GitHub Desktop.
How to fix the TargetInvocationException with EntityFramework Code First Migrations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PM> Add-Migration BlogCreated | |
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) | |
--- End of inner exception stack trace --- | |
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) | |
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) | |
at System.Management.Automation.ComMethod.InvokeMethod(PSMethod method, Object[] arguments) | |
Exception has been thrown by the target of an invocation. | |
PM> Add-Migration BlogCreated -StartupProjectName "Blog.Infrastructure" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment