VS 2015 (RC)下Entitiy Framework 升级后CodeFirst命令不能使用
前阵子闲的没事吧自己项目的Entitiy Framework 升级到6.1.3了,然后紧接着问题来了:
Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $toolsPath = Join-Path <<<< $installPath tools
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path <<<< $ToolsPath EntityFramework.PowerShell.Utility.dll))
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand 不能对值为空的表达式调用方法。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $dispatcher = $utilityAssembly.CreateInstance <<<< (
+ CategoryInfo : InvalidOperation: (CreateInstance:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ (Join-Path <<<< $runner.ToolsPath EntityFramework.PowerShell.dll),
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $toolsPath = Join-Path <<<< $installPath tools
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path <<<< $ToolsPath EntityFramework.PowerShell.Utility.dll))
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand 不能对值为空的表达式调用方法。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $dispatcher = $utilityAssembly.CreateInstance <<<< (
+ CategoryInfo : InvalidOperation: (CreateInstance:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull Join-Path : 无法将参数绑定到参数“Path”,因为该参数是空值。
所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ (Join-Path <<<< $runner.ToolsPath EntityFramework.PowerShell.dll),
+ CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand
一大堆的乱起八糟的,开始以为是Entitiy Framework版本问题或者是VS的问题,各种乱试都没能成功。
无奈只得翻墙GOOGLE了最后得到的结论是:跟Entitiy Framework的版本以及VS都无关是PowerShell的版本问题,
查了下我机器上是2.0版本的
PS C:\Users\PC> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1
于是想法升级(我的版本选择错误,这是个4。0的版本建议升级3.0试试能够成功解决)
Windows Management Framework 4.0
下载地址
https://www.microsoft.com/zh-CN/download/details.aspx?id=40855
我系统是win7 于是下载了 Windows6.1-KB2819745-x64-MultiPkg.msu
悲剧的事这个PowerShell居然是4.0版本的升级过头了出现了新问题:
New-Object : 提供的值无效或属性是只读的。请更改该值,然后再试一次。所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $info = New-Object System.AppDomainSetup -Property @{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [New-Object],Exception
+ FullyQualifiedErrorId : SetValueException,Microsoft.PowerShell.Commands.NewObjectCommand 在此对象上找不到属性“PrivateBinPath”。请确认该属性存在并且可设置。所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $info.PrivateBinPath += ';lib\net45'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [],RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound 使用“”个参数调用“LoadFrom”时发生异常:“指定的路径或文件名太长,或者两者都太长。完全限定文件名必须少于 个字符,并且目录名必须少于 个字符。”所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\Entit
yFramework.psm1: 字符:
+ $utilityAssembly = [System.Reflection.Assembly]::LoadFrom((Join-Path $ToolsP ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PathTooLongException 不能对 Null 值表达式调用方法。所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\tools\EntityFramework.psm1: 字符:
+ $dispatcher = $utilityAssembly.CreateInstance(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [],RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull 使用“”个参数调用“CreateInstanceFrom”时发生异常:“指定的路径或文件名太长,或者两者都太长。完全限定文件名必须少于 个字符,并且目录名必须少于 个字符。”所在位置 F:\Source\WebSolution\packages\EntityFramework.6.1.\t
ools\EntityFramework.psm1: 字符:
+ $domain.CreateInstanceFrom(
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : PathTooLongException
无奈继续求助GOOGLE吧
得到的结论很多有替换EntityFramework.psm1文件,有升级Nuget。
https://github.com/aspnet/EntityFramework/issues/1950#issuecomment-99164398
只得替换EntityFramework.psm1好些没啥效果
最终选择了升级NuGet 3.0 RC2
成功解决!
走了很多弯路,也不知道是不是最正确的解决版本,希望能给遇到同样问题的有所帮助吧。
VS 2015 (RC)下Entitiy Framework 升级后CodeFirst命令不能使用的更多相关文章
- macOS 升级后重装命令行工具的问题
问题背景 最近升级个人macbook 从 10.13 到 10.14 在终端输入 git 不能用了,发现是重装操作系统后原来的 Command Line Tools 被自动卸载了, 采用 xcode- ...
- OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)
OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具) 今天OS X 10.9 Mavericks正式发布,免费更新,立即去更新看看效果. 不过升级后安装命 ...
- CentOS6 系统下升级python后yum命令使用时报错
CentOS6 系统下升级python后yum命令使用时报错,如下: [root@xxxxxxx]#yumFile"/usr/bin/yum",line30exceptKeyboa ...
- CENTOS下Python 升级后YUM无法使用的解决办法
Python有很多实用的工具,安装依赖python版本较高,升级Python后导致yum无法使用. 原因: 系统自带的yum依赖Python老版本,升级后不兼容 解决办法: 1. 列出所有版本,确定老 ...
- Visual Studio 2015 RC版官方下载(ISO)
微软Build2015开发者大会发布了下代开发套件Visual Studio 2015 RC候选版,覆盖企业版.专业版以及免费授权的Community社区版,原生支持开发通用型Windows Apps ...
- 关于kali2.0rolling中metasploit升级后无法启动问题的解决总结
最近在学习metasploit的使用,文中提到可以使用msfupdate命令来对metasploit的payload.exploit等进行升级,我就试了一下,没想到升级过程并不麻烦,但升级后却出现了无 ...
- 【Win10 应用开发】解决VS 2015 RC不能调试手机应用的问题
VS2015 RC已发布,当然这个版本还不能用于实际生产中,如果你没有测试环境,就等正式版出来,RC都来了,RTM就不远了. 如果你也像老周一样,已经在耍RC版了,你可能会遇到下面问题: 安装Win ...
- 转:linux下安装或升级GCC4.8,以支持C++11标准
转:http://www.cnblogs.com/lizhenghn/p/3550996.html C++11标准在2011年8月份获得一致通过,这是自1998年后C++语言第一次大修订,对C++语言 ...
- linux下安装或升级GCC4.8,以支持C++11标准
C++11标准在2011年8月份获得一致通过,这是自1998年后C++语言第一次大修订,对C++语言进行了改进和扩充.随后各编译器厂商都各自实现或部分实现了C++中的特性. 如需查看各编译器对C++1 ...
随机推荐
- HW7.9
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- [iOS基础控件 - 6.6] 展示团购数据 自定义TableViewCell
A.需求 1.头部广告 2.自定义cell:含有图片.名称.购买数量.价格 3.使用xib设计自定义cell,自定义cell继承自UITableViewCell 4.尾部“加载更多按钮”,以及其被点击 ...
- 背景透明文字不透明的最佳方法兼容IE(以背景黑色透明度0.5为例)
以背景黑色,透明度0.5举例为大家详细介绍下关于背景透明,文字不透明的最佳方法同时兼容IE,具体实现如下,感兴趣的朋友可以参考下哈希望对大家有所帮助 以背景黑色,透明度0.5举例 非IE:backgr ...
- 自定义实现MPVolumeView音量控件
http://blog.csdn.net/theonezh/article/details/8158420 http://www.cnblogs.com/cate/ios/ http://www.cn ...
- 一个通用数据库访问类(C#,SqlClient)
本文转自:http://www.7139.com/jsxy/cxsj/c/200607/114291.html使用ADO.NET时,每次数据库操作都要设置connection属性.建立connecti ...
- Oracle 监听器无法启动(TNS-12537,TNS-12560,TNS-00507)
Oracle启动监听报错,提示 连接中断 [oracle@localhost ~]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.1.0 - Pro ...
- Cocos2d-x 3.0心得(01)-图片载入与混合模式
近期開始用cocos2dx 3.0做东西,略有心(cao)得(dian),略微作下记录吧. v3.0相对v2.2来说,最引人注意的,应该是对触摸层级的优化.和lambda回调函数的引入(嗯嗯.不枉我改 ...
- JavaScript学习笔记之下拉选择框的操作
对于下拉框的操作十分繁多,这几天项目须要就总结一下 一.动态构建option 有时候我们须要动态构建下拉选择框里面的值,这里我们就要用到 var varItem = new Option(" ...
- paip.mysql 5.6 安装总结
paip.mysql 5.6 安装总结 作者Attilax , EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.net/atti ...
- MongoDB(四)——管理架构
前面介绍MongoDB基础,在这里,我们推荐两个网站,我们可以看看,评论是相当具体:http://www.w3cschool.cc/mongodb/mongodb-tutorial.html.http ...