tkellogg / Jump-Location

Powershell `cd` that reads your mind
MIT License
467 stars 26 forks source link

Importing Jump-Location in Visual Studio 2015 Package Manager causes weird errors #65

Open albertdev opened 6 years ago

albertdev commented 6 years ago

I was running an Entity Framework helper command to run all code-first migrations on the database when this happened:

PM> update-database
System.ArgumentNullException: Value cannot be null.
Parameter name: type
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(Project project)
   at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project)
   at System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory)
   at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
   at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Value cannot be null.
Parameter name: type

I only get this error when I start Visual Studio 2015 and import the Jump.Location module, removing the import from my profile.ps1 and restarting Visual Studio will fix it.

Preferably this error is fixed, but if it's hard then I would be content with at least a warning that you should only import it in the default console version or ISE.