powershell - Entitiy Framework migration with EF in multiple projects -


currently trying separate data model different project in same solution, code first. if have 1 project ef( 6.1.3 ) installed, migration ( enable-migration, add-migration ) work intended.

but add other project , install ef packet, if try enable-migration, i've got error:

join-path : cannot bind argument parameter 'path' because null. @ c:\projects\ims 2\packages\entityframework.6.1.3\tools\entityframework.psm1:713 char:27 +     $toolspath = join-path <<<<  $installpath tools     + categoryinfo          : invaliddata: (:) [join-path], parameterbindingvalidationexception     + fullyqualifiederrorid : parameterargumentvalidationerrornullnotallowed,microsoft.powershell.commands.joinpathcommand  join-path : cannot bind argument parameter 'path' because null. @ c:\projects\ims 2\packages\entityframework.6.1.3\tools\entityframework.psm1:780 char:73 +     $utilityassembly = [system.reflection.assembly]::loadfrom((join-path <<<<  $toolspath entityframework.powershell.utility.dll))     + categoryinfo          : invaliddata: (:) [join-path], parameterbindingvalidationexception     + fullyqualifiederrorid : parameterargumentvalidationerrornullnotallowed,microsoft.powershell.commands.joinpathcommand  cannot call method on null-valued expression. @ c:\projects\ims 2\packages\entityframework.6.1.3\tools\entityframework.psm1:781 char:50 +     $dispatcher = $utilityassembly.createinstance <<<< (     + categoryinfo          : invalidoperation: (createinstance:string) [], runtimeexception     + fullyqualifiederrorid : invokemethodonnull  join-path : cannot bind argument parameter 'path' because null. @ c:\projects\ims 2\packages\entityframework.6.1.3\tools\entityframework.psm1:810 char:19 +         (join-path <<<<  $runner.toolspath entityframework.powershell.dll),     + categoryinfo          : invaliddata: (:) [join-path], parameterbindingvalidationexception     + fullyqualifiederrorid : parameterargumentvalidationerrornullnotallowed,microsoft.powershell.commands.joinpathcommand 

ef seems work fine in both of projects. reinstalling ef either or both of projects did not solve it. solution in mind?

edit: started new solution 3 projects, 1. basecontext( public class basecontext<tcontext> : dbcontext tcontext : dbcontext ... ), 2. base classes, , 3. creating context based on base context , classes. if put ef in 1 migrtation works, or @ least tells me thet can't find context, if install more one, it's producing error again.

i found same problem today , had uninstall ef , install again.

pm> uninstall-package entityframework -force

pm> install-package entityframework -pre


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -